Skip to content

Commit 809309a

Browse files
committed
Issue #14876: Use user-selected font for highlight configuration.
Patch by Roger Serwy.
1 parent ffa4b2c commit 809309a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/idlelib/configDialog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def CreatePageHighlight(self):
187187
text=' Highlighting Theme ')
188188
#frameCustom
189189
self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1,
190-
font=('courier',12,''),cursor='hand2',width=21,height=10,
190+
font=('courier',12,''),cursor='hand2',width=21,height=11,
191191
takefocus=FALSE,highlightthickness=0,wrap=NONE)
192192
text=self.textHighlightSample
193193
text.bind('<Double-Button-1>',lambda e: 'break')
@@ -821,8 +821,10 @@ def SetFontSample(self,event=None):
821821
fontWeight=tkFont.BOLD
822822
else:
823823
fontWeight=tkFont.NORMAL
824-
self.editFont.config(size=self.fontSize.get(),
824+
size=self.fontSize.get()
825+
self.editFont.config(size=size,
825826
weight=fontWeight,family=fontName)
827+
self.textHighlightSample.configure(font=(fontName, size, fontWeight))
826828

827829
def SetHighlightTarget(self):
828830
if self.highlightTarget.get()=='Cursor': #bg not possible

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Core and Builtins
6767
Library
6868
-------
6969

70+
- Issue #14876: Use user-selected font for highlight configuration.
71+
7072
- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
7173
Have ascii characters in help.
7274

0 commit comments

Comments
 (0)