From 38a5a3b3f10b10fe74c4d95fb970c41c2520981c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 29 Jan 1999 20:44:45 +0000 Subject: Use only the height to decide whether to zoom in or out. --- Tools/idle/ZoomHeight.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Tools/idle/ZoomHeight.py b/Tools/idle/ZoomHeight.py index eb61131..0aefea6 100644 --- a/Tools/idle/ZoomHeight.py +++ b/Tools/idle/ZoomHeight.py @@ -29,14 +29,15 @@ class ZoomHeight: top.bell() return width, height, x, y = map(int, m.groups()) - height = top.winfo_screenheight() + newheight = top.winfo_screenheight() if sys.platform == 'win32': - y = 0 - height = height - 72 + newy = 0 + newheight = newheight - 72 else: - y = 24 - height = height - 96 - newgeom = "%dx%d+%d+%d" % (width, height, x, y) - if geom == newgeom: + newy = 24 + newheight = newheight - 96 + if height >= newheight: newgeom = "" + else: + newgeom = "%dx%d+%d+%d" % (width, newheight, x, newy) top.wm_geometry(newgeom) -- cgit v0.12