|
9 | 9 | import idlever |
10 | 10 | import WindowList |
11 | 11 |
|
| 12 | +# Customization of default window size and font |
| 13 | +# standard |
| 14 | +WIDTH = 80 |
| 15 | +HEIGHT = 24 |
| 16 | +if sys.platform[:3] == 'win': |
| 17 | + FONT = ("courier new", 10) |
| 18 | +else: |
| 19 | + FONT = ("courier", 10) |
| 20 | +if 0: |
| 21 | + # for demos (on Windows) |
| 22 | + WIDTH = 70 |
| 23 | + HEIGHT = 16 |
| 24 | + FONT = ("lucida console", 14) |
| 25 | +if 0: |
| 26 | + # for Windows 98 |
| 27 | + FONT = ("lucida console", 8) |
| 28 | + |
12 | 29 | # The default tab setting for a Text widget, in average-width characters. |
13 | 30 | TK_TABWIDTH_DEFAULT = 8 |
14 | 31 |
|
@@ -109,6 +126,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): |
109 | 126 | highlightcolor=cprefs.CHilite[0], |
110 | 127 | highlightbackground=cprefs.CHilite[1], |
111 | 128 | insertbackground=cprefs.CCursor[1], |
| 129 | + width=WIDTH, height=HEIGHT, |
112 | 130 | wrap="none") |
113 | 131 |
|
114 | 132 | self.createmenubar() |
@@ -138,9 +156,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): |
138 | 156 | vbar.pack(side=RIGHT, fill=Y) |
139 | 157 |
|
140 | 158 | text['yscrollcommand'] = vbar.set |
141 | | - if sys.platform[:3] == 'win': |
142 | | - text['font'] = ("lucida console", 8) |
143 | | -# text['font'] = ("courier new", 10) |
| 159 | + text['font'] = FONT |
144 | 160 | text_frame.pack(side=LEFT, fill=BOTH, expand=1) |
145 | 161 | text.pack(side=TOP, fill=BOTH, expand=1) |
146 | 162 | text.focus_set() |
|
0 commit comments