mirror of
https://github.com/python/cpython.git
synced 2025-12-11 11:31:05 +00:00
This fixes issue3883 (text on the buttons in the preferences panel for IDLE doesn't fit on OSX)
This commit is contained in:
parent
3e264e13ed
commit
9e35004509
1 changed files with 14 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ from idlelib.tabbedpages import TabbedPageSet
|
||||||
from idlelib.keybindingDialog import GetKeysDialog
|
from idlelib.keybindingDialog import GetKeysDialog
|
||||||
from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
|
from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
|
||||||
from idlelib.configHelpSourceEdit import GetHelpSourceDialog
|
from idlelib.configHelpSourceEdit import GetHelpSourceDialog
|
||||||
|
from idlelib import macosxSupport
|
||||||
|
|
||||||
class ConfigDialog(Toplevel):
|
class ConfigDialog(Toplevel):
|
||||||
|
|
||||||
|
|
@ -71,18 +72,27 @@ class ConfigDialog(Toplevel):
|
||||||
page_names=['Fonts/Tabs','Highlighting','Keys','General'])
|
page_names=['Fonts/Tabs','Highlighting','Keys','General'])
|
||||||
frameActionButtons = Frame(self,pady=2)
|
frameActionButtons = Frame(self,pady=2)
|
||||||
#action buttons
|
#action buttons
|
||||||
|
|
||||||
|
if macosxSupport.runningAsOSXApp():
|
||||||
|
# Surpress the padx and pady arguments when
|
||||||
|
# running as IDLE.app, otherwise the text
|
||||||
|
# on these buttons will not be readable.
|
||||||
|
extraKwds={}
|
||||||
|
else:
|
||||||
|
extraKwds=dict(padx=6, pady=3)
|
||||||
|
|
||||||
self.buttonHelp = Button(frameActionButtons,text='Help',
|
self.buttonHelp = Button(frameActionButtons,text='Help',
|
||||||
command=self.Help,takefocus=FALSE,
|
command=self.Help,takefocus=FALSE,
|
||||||
padx=6,pady=3)
|
**extraKwds)
|
||||||
self.buttonOk = Button(frameActionButtons,text='Ok',
|
self.buttonOk = Button(frameActionButtons,text='Ok',
|
||||||
command=self.Ok,takefocus=FALSE,
|
command=self.Ok,takefocus=FALSE,
|
||||||
padx=6,pady=3)
|
**extraKwds)
|
||||||
self.buttonApply = Button(frameActionButtons,text='Apply',
|
self.buttonApply = Button(frameActionButtons,text='Apply',
|
||||||
command=self.Apply,takefocus=FALSE,
|
command=self.Apply,takefocus=FALSE,
|
||||||
padx=6,pady=3)
|
**extraKwds)
|
||||||
self.buttonCancel = Button(frameActionButtons,text='Cancel',
|
self.buttonCancel = Button(frameActionButtons,text='Cancel',
|
||||||
command=self.Cancel,takefocus=FALSE,
|
command=self.Cancel,takefocus=FALSE,
|
||||||
padx=6,pady=3)
|
**extraKwds)
|
||||||
self.CreatePageFontTab()
|
self.CreatePageFontTab()
|
||||||
self.CreatePageHighlight()
|
self.CreatePageHighlight()
|
||||||
self.CreatePageKeys()
|
self.CreatePageKeys()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue