changeset: 98262:1c119da20663 branch: 3.4 parent: 98258:a43d79b2434c user: Terry Jan Reedy date: Fri Sep 25 00:49:18 2015 -0400 files: Lib/idlelib/help.py description: Issue #25198: Idle doc viewer now uses user width and height setting. The height is reduced by 3/4 to account for extra spacing between lines, relative to an Idle editor, and extra tall header lines. diff -r a43d79b2434c -r 1c119da20663 Lib/idlelib/help.py --- a/Lib/idlelib/help.py Thu Sep 24 23:18:57 2015 -0400 +++ b/Lib/idlelib/help.py Fri Sep 25 00:49:18 2015 -0400 @@ -28,6 +28,7 @@ from os.path import abspath, dirname, isdir, isfile, join from tkinter import Tk, Toplevel, Frame, Text, Scrollbar, Menu, Menubutton from tkinter import font as tkfont +from idlelib.configHandler import idleConf use_ttk = False # until available to import if use_ttk: @@ -158,8 +159,11 @@ "Display help.html." def __init__(self, parent, filename): "Configure tags and feed file to parser." + uwide = idleConf.GetOption('main', 'EditorWindow', 'width', type='int') + uhigh = idleConf.GetOption('main', 'EditorWindow', 'height', type='int') + uhigh = 3 * uhigh // 4 # lines average 4/3 of editor line height Text.__init__(self, parent, wrap='word', highlightthickness=0, - padx=5, borderwidth=0) + padx=5, borderwidth=0, width=uwide, height=uhigh) normalfont = self.findfont(['TkDefaultFont', 'arial', 'helvetica']) fixedfont = self.findfont(['TkFixedFont', 'monaco', 'courier'])