summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-17 16:14:16 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-17 16:14:16 (GMT)
commit99aabe30cedd708c50450938739aff7999b86f4e (patch)
tree9cc76175b78b3238f889c6b846a75aa830594bcb
parent795e189d28f7afd9f4e864a998658e3302efb59e (diff)
downloadcpython-99aabe30cedd708c50450938739aff7999b86f4e.zip
cpython-99aabe30cedd708c50450938739aff7999b86f4e.tar.gz
cpython-99aabe30cedd708c50450938739aff7999b86f4e.tar.bz2
Add primitive customization of window size and font.
A few alternative selections can be made by changing "if 0" to "if 1".
-rw-r--r--Tools/idle/EditorWindow.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py
index 44e2b13..0e0e0dc 100644
--- a/Tools/idle/EditorWindow.py
+++ b/Tools/idle/EditorWindow.py
@@ -9,6 +9,23 @@ import tkMessageBox
import idlever
import WindowList
+# Customization of default window size and font
+# standard
+WIDTH = 80
+HEIGHT = 24
+if sys.platform[:3] == 'win':
+ FONT = ("courier new", 10)
+else:
+ FONT = ("courier", 10)
+if 0:
+ # for demos (on Windows)
+ WIDTH = 70
+ HEIGHT = 16
+ FONT = ("lucida console", 14)
+if 0:
+ # for Windows 98
+ FONT = ("lucida console", 8)
+
# The default tab setting for a Text widget, in average-width characters.
TK_TABWIDTH_DEFAULT = 8
@@ -109,6 +126,7 @@ class EditorWindow:
highlightcolor=cprefs.CHilite[0],
highlightbackground=cprefs.CHilite[1],
insertbackground=cprefs.CCursor[1],
+ width=WIDTH, height=HEIGHT,
wrap="none")
self.createmenubar()
@@ -138,9 +156,7 @@ class EditorWindow:
vbar.pack(side=RIGHT, fill=Y)
text['yscrollcommand'] = vbar.set
- if sys.platform[:3] == 'win':
- text['font'] = ("lucida console", 8)
-# text['font'] = ("courier new", 10)
+ text['font'] = FONT
text_frame.pack(side=LEFT, fill=BOTH, expand=1)
text.pack(side=TOP, fill=BOTH, expand=1)
text.focus_set()