repair posix fonts fix

This commit is contained in:
Steven M. Gava 2001-08-11 15:48:13 +00:00
parent 58682b7fe5
commit c01e30f072
2 changed files with 66 additions and 38 deletions

View file

@ -8,6 +8,7 @@
about box for idle
"""
from Tkinter import *
import tkFont
import string, os
import textView
import idlever
@ -24,12 +25,8 @@ class AboutDialog(Toplevel):
self.bg="#555555"
self.fg="#ffffff"
#no ugly bold default font on *nix
font=Label().cget('font')
if os.name=='posix':
lFont=font.split()
if len(lFont) == 2: lFont=lFont+['normal']
else: lFont[2]='normal'
font=tuple(lFont)
font=tkFont.Font(self,Label().cget('font'))
if os.name=='posix': font.config(weight=NORMAL)
self.textFont=font
self.CreateWidgets()