mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
repair posix fonts fix
This commit is contained in:
parent
58682b7fe5
commit
c01e30f072
2 changed files with 66 additions and 38 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue