Use only the height to decide whether to zoom in or out.

This commit is contained in:
Guido van Rossum 1999-01-29 20:44:45 +00:00
parent 7890203f49
commit 38a5a3b3f1
1 changed files with 8 additions and 7 deletions

View 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)