]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
1. SF Bug 661676
authorKurt B. Kaiser <kbk@shore.net>
Mon, 26 May 2003 20:35:53 +0000 (20:35 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Mon, 26 May 2003 20:35:53 +0000 (20:35 +0000)
   The default font is not highlighted in the Options dialog when
   IDLEfork is first installed.

2. Reduce default font to 10 pt and increase default window height to give
   a better initial impression on Windows.

M config-main.def
M configDialog.py

Lib/idlelib/config-main.def
Lib/idlelib/configDialog.py

index 70b8c1ac3e847bb363b6b43654ec488b9f5d0a7a..1350d605b61c749f9e0933d65381ed65f9d32658 100644 (file)
@@ -46,9 +46,9 @@ print-command-win=start /min notepad /p %s
 
 [EditorWindow]
 width= 80
-height= 30
+height= 40
 font= courier
-font-size= 12
+font-size= 10
 font-bold= 0
 encoding= none
 
index bdf253bdc11e133685a8473a682d781fdfc433fc..af3e98aeb9a5ffc03c973e15cd120abc8e7096a6 100644 (file)
@@ -93,7 +93,7 @@ class ConfigDialog(Toplevel):
         self.spaceNum=IntVar(self)
         #self.tabCols=IntVar(self)
         self.indentBySpaces=BooleanVar(self)
-        self.editFont=tkFont.Font(self,('courier',12,'normal'))
+        self.editFont=tkFont.Font(self,('courier',10,'normal'))
         ##widget creation
         #body frame
         frame=self.tabPages.pages['Fonts/Tabs']['page']
@@ -837,7 +837,8 @@ class ConfigDialog(Toplevel):
         self.SetThemeType()
 
     def OnListFontButtonRelease(self,event):
-        self.fontName.set(self.listFontName.get(ANCHOR))
+        font = self.listFontName.get(ANCHOR)
+        self.fontName.set(font.lower())
         self.SetFontSample()
 
     def SetFontSample(self,event=None):
@@ -956,15 +957,17 @@ class ConfigDialog(Toplevel):
             self.listFontName.insert(END,font)
         configuredFont=idleConf.GetOption('main','EditorWindow','font',
                 default='courier')
-        self.fontName.set(configuredFont)
-        if configuredFont in fonts:
-            currentFontIndex=fonts.index(configuredFont)
+        lc_configuredFont = configuredFont.lower()
+        self.fontName.set(lc_configuredFont)
+        lc_fonts = [s.lower() for s in fonts]
+        if lc_configuredFont in lc_fonts:
+            currentFontIndex = lc_fonts.index(lc_configuredFont)
             self.listFontName.see(currentFontIndex)
             self.listFontName.select_set(currentFontIndex)
             self.listFontName.select_anchor(currentFontIndex)
         ##font size dropdown
         fontSize=idleConf.GetOption('main','EditorWindow','font-size',
-                default='12')
+                default='10')
         self.optMenuFontSize.SetMenu(('7','8','9','10','11','12','13','14',
                 '16','18','20','22'),fontSize )
         ##fontWeight