summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/idle/ZoomHeight.py15
1 files 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)