mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Converting height/width formulas to integers.
This commit is contained in:
parent
d3ef4bd343
commit
aa24f15a84
4 changed files with 10 additions and 10 deletions
|
@ -229,9 +229,9 @@ class SelectCardsetDialogWithPreview(MfxDialog):
|
||||||
sw = self.top.winfo_screenwidth()
|
sw = self.top.winfo_screenwidth()
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = int(sh * .8)
|
||||||
w = sw * .8
|
w = int(sw * .8)
|
||||||
w1 = min(250, sw / 2.5)
|
w1 = int(min(250, sw / 2.5))
|
||||||
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
||||||
self.top.wm_minsize(400, 200)
|
self.top.wm_minsize(400, 200)
|
||||||
|
|
||||||
|
|
|
@ -354,9 +354,9 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
||||||
sw = self.top.winfo_screenwidth()
|
sw = self.top.winfo_screenwidth()
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = int(sh * .8)
|
||||||
w = sw * .8
|
w = int(sw * .8)
|
||||||
w1 = min(250, sw / 2.5)
|
w1 = int(min(250, sw / 2.5))
|
||||||
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
||||||
self.top.wm_minsize(400, 200)
|
self.top.wm_minsize(400, 200)
|
||||||
|
|
||||||
|
|
|
@ -130,9 +130,9 @@ class SelectTileDialogWithPreview(MfxDialog):
|
||||||
sw = self.top.winfo_screenwidth()
|
sw = self.top.winfo_screenwidth()
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = int(sh * .8)
|
||||||
w = sw * .8
|
w = int(sw * .8)
|
||||||
w1 = min(250, sw / 2.5)
|
w1 = int(min(250, sw / 2.5))
|
||||||
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
geometry = ("%dx%d+%d+%d" % (w, h, (sw - w) / 2, (sh - h) / 2))
|
||||||
self.top.wm_minsize(400, 200)
|
self.top.wm_minsize(400, 200)
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ class BaseSelectDialogTreeCanvas:
|
||||||
height = 25 * disty
|
height = 25 * disty
|
||||||
if parent and parent.winfo_screenheight() >= 800:
|
if parent and parent.winfo_screenheight() >= 800:
|
||||||
height = 30 * disty
|
height = 30 * disty
|
||||||
height = min(height, parent.winfo_screenheight() * .35)
|
height = int(min(height, parent.winfo_screenheight() * .35))
|
||||||
self.lines = height // disty
|
self.lines = height // disty
|
||||||
self._calc_MfxTreeInCanvas().__init__(
|
self._calc_MfxTreeInCanvas().__init__(
|
||||||
self, parent, self.data.rootnodes,
|
self, parent, self.data.rootnodes,
|
||||||
|
|
Loading…
Add table
Reference in a new issue