[Python-checkins] r69543 - in python/branches/release30-maint: Lib/idlelib/configDialog.py

ronald.oussoren python-checkins at python.org
Thu Feb 12 17:03:30 CET 2009


Author: ronald.oussoren
Date: Thu Feb 12 17:03:30 2009
New Revision: 69543

Log:
Merged revisions 69542 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69542 | ronald.oussoren | 2009-02-12 17:02:11 +0100 (Thu, 12 Feb 2009) | 2 lines
  
  This fixes issue3883 (text on the buttons in the preferences panel for IDLE doesn't fit on OSX)
........


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Lib/idlelib/configDialog.py

Modified: python/branches/release30-maint/Lib/idlelib/configDialog.py
==============================================================================
--- python/branches/release30-maint/Lib/idlelib/configDialog.py	(original)
+++ python/branches/release30-maint/Lib/idlelib/configDialog.py	Thu Feb 12 17:03:30 2009
@@ -21,6 +21,7 @@
 from idlelib.keybindingDialog import GetKeysDialog
 from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
 from idlelib.configHelpSourceEdit import GetHelpSourceDialog
+from idlelib import macosxSupport
 
 class ConfigDialog(Toplevel):
 
@@ -71,18 +72,27 @@
                 page_names=['Fonts/Tabs','Highlighting','Keys','General'])
         frameActionButtons = Frame(self,pady=2)
         #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',
                 command=self.Help,takefocus=FALSE,
-                padx=6,pady=3)
+                **extraKwds)
         self.buttonOk = Button(frameActionButtons,text='Ok',
                 command=self.Ok,takefocus=FALSE,
-                padx=6,pady=3)
+                **extraKwds)
         self.buttonApply = Button(frameActionButtons,text='Apply',
                 command=self.Apply,takefocus=FALSE,
-                padx=6,pady=3)
+                **extraKwds)
         self.buttonCancel = Button(frameActionButtons,text='Cancel',
                 command=self.Cancel,takefocus=FALSE,
-                padx=6,pady=3)
+                **extraKwds)
         self.CreatePageFontTab()
         self.CreatePageHighlight()
         self.CreatePageKeys()


More information about the Python-checkins mailing list