|
28 | 28 | from os.path import abspath, dirname, isdir, isfile, join |
29 | 29 | from tkinter import Tk, Toplevel, Frame, Text, Scrollbar, Menu, Menubutton |
30 | 30 | from tkinter import font as tkfont |
| 31 | +from idlelib.configHandler import idleConf |
31 | 32 |
|
32 | 33 | use_ttk = False # until available to import |
33 | 34 | if use_ttk: |
@@ -158,8 +159,11 @@ class HelpText(Text): |
158 | 159 | "Display help.html." |
159 | 160 | def __init__(self, parent, filename): |
160 | 161 | "Configure tags and feed file to parser." |
| 162 | + uwide = idleConf.GetOption('main', 'EditorWindow', 'width', type='int') |
| 163 | + uhigh = idleConf.GetOption('main', 'EditorWindow', 'height', type='int') |
| 164 | + uhigh = 3 * uhigh // 4 # lines average 4/3 of editor line height |
161 | 165 | Text.__init__(self, parent, wrap='word', highlightthickness=0, |
162 | | - padx=5, borderwidth=0) |
| 166 | + padx=5, borderwidth=0, width=uwide, height=uhigh) |
163 | 167 |
|
164 | 168 | normalfont = self.findfont(['TkDefaultFont', 'arial', 'helvetica']) |
165 | 169 | fixedfont = self.findfont(['TkFixedFont', 'monaco', 'courier']) |
|
0 commit comments