summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-29 20:44:45 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-29 20:44:45 (GMT)
commit38a5a3b3f10b10fe74c4d95fb970c41c2520981c (patch)
tree6bdaa529643f9d769936723b95a29c9a3f675f6b /Tools
parent7890203f491e9e967017676bf444b03c913ca8b5 (diff)
downloadcpython-38a5a3b3f10b10fe74c4d95fb970c41c2520981c.zip
cpython-38a5a3b3f10b10fe74c4d95fb970c41c2520981c.tar.gz
cpython-38a5a3b3f10b10fe74c4d95fb970c41c2520981c.tar.bz2
Use only the height to decide whether to zoom in or out.
Diffstat (limited to 'Tools')
-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)