mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fix for issue #226.
This commit is contained in:
parent
6984edb6ba
commit
89e8a0a81e
4 changed files with 13 additions and 13 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(275, sw / 2.5)
|
w1 = int(min(275, 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)
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ class SelectCardsetDialogWithPreview(MfxDialog):
|
||||||
font = app.getFont("default")
|
font = app.getFont("default")
|
||||||
self.tree = self.Tree_Class(self, left_frame, key=key,
|
self.tree = self.Tree_Class(self, left_frame, key=key,
|
||||||
default=kw.default,
|
default=kw.default,
|
||||||
font=font, width=int(w1))
|
font=font, width=w1)
|
||||||
self.tree.frame.grid(row=0, column=0, sticky='nsew',
|
self.tree.frame.grid(row=0, column=0, sticky='nsew',
|
||||||
padx=padx, pady=pady)
|
padx=padx, pady=pady)
|
||||||
if USE_PIL:
|
if USE_PIL:
|
||||||
|
|
|
@ -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(275, sw / 2.5)
|
w1 = int(min(275, 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)
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
||||||
font = app.getFont("default")
|
font = app.getFont("default")
|
||||||
self.tree = self.Tree_Class(self, left_frame, key=gameid,
|
self.tree = self.Tree_Class(self, left_frame, key=gameid,
|
||||||
default=kw.default, font=font,
|
default=kw.default, font=font,
|
||||||
width=int(w1))
|
width=w1)
|
||||||
self.tree.frame.pack(padx=padx, pady=pady, expand=True, fill='both')
|
self.tree.frame.pack(padx=padx, pady=pady, expand=True, fill='both')
|
||||||
# LabelFrame
|
# LabelFrame
|
||||||
info_frame = ttk.LabelFrame(right_frame, text=_('About game'))
|
info_frame = ttk.LabelFrame(right_frame, text=_('About game'))
|
||||||
|
|
|
@ -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(275, sw / 2.5)
|
w1 = int(min(275, 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)
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class SelectTileDialogWithPreview(MfxDialog):
|
||||||
frame.pack(fill='both', expand=True,
|
frame.pack(fill='both', expand=True,
|
||||||
padx=kw.padx-padx, pady=kw.pady-pady)
|
padx=kw.padx-padx, pady=kw.pady-pady)
|
||||||
self.tree = self.Tree_Class(self, frame, key=key, default=kw.default,
|
self.tree = self.Tree_Class(self, frame, key=key, default=kw.default,
|
||||||
font=font, width=int(w1))
|
font=font, width=w1)
|
||||||
self.tree.frame.pack(side="left", fill='both', expand=False,
|
self.tree.frame.pack(side="left", fill='both', expand=False,
|
||||||
padx=padx, pady=pady)
|
padx=padx, pady=pady)
|
||||||
self.preview = MfxScrolledCanvas(frame, hbar=0, vbar=0)
|
self.preview = MfxScrolledCanvas(frame, hbar=0, vbar=0)
|
||||||
|
|
|
@ -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