@@ -159,8 +159,12 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
159159 vbar .pack (side = RIGHT , fill = Y )
160160
161161 text ['yscrollcommand' ] = vbar .set
162+ fontWeight = 'normal'
163+ if idleConf .GetOption ('main' ,'EditorWindow' ,'font-bold' ,type = 'bool' ):
164+ fontWeight = 'bold'
162165 text .config (font = (idleConf .GetOption ('main' ,'EditorWindow' ,'font' ),
163- idleConf .GetOption ('main' ,'EditorWindow' ,'font-size' )))
166+ idleConf .GetOption ('main' ,'EditorWindow' ,'font-size' ),
167+ fontWeight ))
164168 text_frame .pack (side = LEFT , fill = BOTH , expand = 1 )
165169 text .pack (side = TOP , fill = BOTH , expand = 1 )
166170 text .focus_set ()
@@ -478,6 +482,16 @@ def ResetColorizer(self):
478482 self .color = self .ColorDelegator ()
479483 self .per .insertfilter (self .color )
480484
485+ def ResetFont (self ):
486+ #this function is called from configDialog.py
487+ #to update the text widgets' font if it is changed
488+ fontWeight = 'normal'
489+ if idleConf .GetOption ('main' ,'EditorWindow' ,'font-bold' ,type = 'bool' ):
490+ fontWeight = 'bold'
491+ self .text .config (font = (idleConf .GetOption ('main' ,'EditorWindow' ,'font' ),
492+ idleConf .GetOption ('main' ,'EditorWindow' ,'font-size' ),
493+ fontWeight ))
494+
481495 def saved_change_hook (self ):
482496 short = self .short_title ()
483497 long = self .long_title ()
0 commit comments