Use only the height to decide whether to zoom in or out.
This commit is contained in:
parent
7890203f49
commit
38a5a3b3f1
|
@ -29,14 +29,15 @@ class ZoomHeight:
|
||||||
top.bell()
|
top.bell()
|
||||||
return
|
return
|
||||||
width, height, x, y = map(int, m.groups())
|
width, height, x, y = map(int, m.groups())
|
||||||
height = top.winfo_screenheight()
|
newheight = top.winfo_screenheight()
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
y = 0
|
newy = 0
|
||||||
height = height - 72
|
newheight = newheight - 72
|
||||||
else:
|
else:
|
||||||
y = 24
|
newy = 24
|
||||||
height = height - 96
|
newheight = newheight - 96
|
||||||
newgeom = "%dx%d+%d+%d" % (width, height, x, y)
|
if height >= newheight:
|
||||||
if geom == newgeom:
|
|
||||||
newgeom = ""
|
newgeom = ""
|
||||||
|
else:
|
||||||
|
newgeom = "%dx%d+%d+%d" % (width, newheight, x, newy)
|
||||||
top.wm_geometry(newgeom)
|
top.wm_geometry(newgeom)
|
||||||
|
|
Loading…
Reference in New Issue