mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Merge Issue #14876: Use user-selected font for highlight configuration.
Patch by Roger Serwy.
This commit is contained in:
commit
1a0df94db3
2 changed files with 6 additions and 2 deletions
|
@ -187,7 +187,7 @@ class ConfigDialog(Toplevel):
|
||||||
text=' Highlighting Theme ')
|
text=' Highlighting Theme ')
|
||||||
#frameCustom
|
#frameCustom
|
||||||
self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1,
|
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)
|
takefocus=FALSE,highlightthickness=0,wrap=NONE)
|
||||||
text=self.textHighlightSample
|
text=self.textHighlightSample
|
||||||
text.bind('<Double-Button-1>',lambda e: 'break')
|
text.bind('<Double-Button-1>',lambda e: 'break')
|
||||||
|
@ -821,8 +821,10 @@ class ConfigDialog(Toplevel):
|
||||||
fontWeight=tkFont.BOLD
|
fontWeight=tkFont.BOLD
|
||||||
else:
|
else:
|
||||||
fontWeight=tkFont.NORMAL
|
fontWeight=tkFont.NORMAL
|
||||||
self.editFont.config(size=self.fontSize.get(),
|
size=self.fontSize.get()
|
||||||
|
self.editFont.config(size=size,
|
||||||
weight=fontWeight,family=fontName)
|
weight=fontWeight,family=fontName)
|
||||||
|
self.textHighlightSample.configure(font=(fontName, size, fontWeight))
|
||||||
|
|
||||||
def SetHighlightTarget(self):
|
def SetHighlightTarget(self):
|
||||||
if self.highlightTarget.get()=='Cursor': #bg not possible
|
if self.highlightTarget.get()=='Cursor': #bg not possible
|
||||||
|
|
|
@ -60,6 +60,8 @@ Library
|
||||||
new features through new policies. Note that Policy.must_be_7bit is renamed
|
new features through new policies. Note that Policy.must_be_7bit is renamed
|
||||||
to cte_type.
|
to cte_type.
|
||||||
|
|
||||||
|
- Issue #14876: Use user-selected font for highlight configuration.
|
||||||
|
|
||||||
- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
|
- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
|
||||||
Have ascii characters in help.
|
Have ascii characters in help.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue