summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-08-01 22:57:33 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-08-01 22:57:33 (GMT)
commitd87d16826ac55f260b706cb63d8ee0a7d3c6d893 (patch)
treecf6b3f446a0225d092116e897f68043a2f0f8e55 /Lib/idlelib/EditorWindow.py
parent231007fe142975ee5e468929af5ed69705e7547e (diff)
downloadcpython-d87d16826ac55f260b706cb63d8ee0a7d3c6d893.zip
cpython-d87d16826ac55f260b706cb63d8ee0a7d3c6d893.tar.gz
cpython-d87d16826ac55f260b706cb63d8ee0a7d3c6d893.tar.bz2
Issue 24745: Switch from Courier to platform-sensitive TkFixedFont as default
editor font. This should not affect current customized font selections. Patch by Mark Roseman.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 7bc2aa7..6dbbe09 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -230,13 +230,7 @@ class EditorWindow(object):
vbar['command'] = text.yview
vbar.pack(side=RIGHT, fill=Y)
text['yscrollcommand'] = vbar.set
- fontWeight = 'normal'
- if idleConf.GetOption('main', 'EditorWindow', 'font-bold', type='bool'):
- fontWeight='bold'
- text.config(font=(idleConf.GetOption('main', 'EditorWindow', 'font'),
- idleConf.GetOption('main', 'EditorWindow',
- 'font-size', type='int'),
- fontWeight))
+ text['font'] = idleConf.GetFont(self.root, 'main', 'EditorWindow')
text_frame.pack(side=LEFT, fill=BOTH, expand=1)
text.pack(side=TOP, fill=BOTH, expand=1)
text.focus_set()
@@ -797,13 +791,8 @@ class EditorWindow(object):
def ResetFont(self):
"Update the text widgets' font if it is changed"
# Called from configDialog.py
- fontWeight='normal'
- if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'):
- fontWeight='bold'
- self.text.config(font=(idleConf.GetOption('main','EditorWindow','font'),
- idleConf.GetOption('main','EditorWindow','font-size',
- type='int'),
- fontWeight))
+
+ self.text['font'] = idleConf.GetFont(self.root, 'main','EditorWindow')
def RemoveKeybindings(self):
"Remove the keybindings before they are changed."