Issue #14876: Use user-selected font for highlight configuration.
Patch by Roger Serwy.
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index dbaedc7..11aac9e 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -183,7 +183,7 @@
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')
@@ -832,8 +832,10 @@
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