]> granicus.if.org Git - python/commitdiff
Use only the height to decide whether to zoom in or out.
authorGuido van Rossum <guido@python.org>
Fri, 29 Jan 1999 20:44:45 +0000 (20:44 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 29 Jan 1999 20:44:45 +0000 (20:44 +0000)
Tools/idle/ZoomHeight.py

index eb611317dae50feb0e10cefd53253ab9da95f055..0aefea63375f0f426e9261b01b8422cfe31631dc 100644 (file)
@@ -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)