]> granicus.if.org Git - python/commitdiff
Issue #14876: Use user-selected font for highlight configuration.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 26 May 2012 20:31:00 +0000 (16:31 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 26 May 2012 20:31:00 +0000 (16:31 -0400)
Patch by Roger Serwy.

Lib/idlelib/configDialog.py
Misc/NEWS

index d09fb5eed42e22acaa4c22f337a12417e2185ac9..2701b42f43d54fb2c91e6cbca8694d089918692e 100644 (file)
@@ -187,7 +187,7 @@ class ConfigDialog(Toplevel):
                               text=' Highlighting Theme ')
         #frameCustom
         self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1,
-            font=('courier',12,''),cursor='hand2',width=21,height=10,
+            font=('courier',12,''),cursor='hand2',width=21,height=11,
             takefocus=FALSE,highlightthickness=0,wrap=NONE)
         text=self.textHighlightSample
         text.bind('<Double-Button-1>',lambda e: 'break')
@@ -821,8 +821,10 @@ class ConfigDialog(Toplevel):
             fontWeight=tkFont.BOLD
         else:
             fontWeight=tkFont.NORMAL
-        self.editFont.config(size=self.fontSize.get(),
+        size=self.fontSize.get()
+        self.editFont.config(size=size,
                 weight=fontWeight,family=fontName)
+        self.textHighlightSample.configure(font=(fontName, size, fontWeight))
 
     def SetHighlightTarget(self):
         if self.highlightTarget.get()=='Cursor': #bg not possible
index 10b8ab175c1d6bcd2196d4bffd41f34dea13c562..98e52b03edc409fd4b9371d8023d21064b4005c4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #14876: Use user-selected font for highlight configuration.
+
 - Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
   Have ascii characters in help.