mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fixed window/tree scaling on smaller screens.
This commit is contained in:
parent
87c8160761
commit
13d34238e2
4 changed files with 4 additions and 3 deletions
|
@ -231,7 +231,7 @@ class SelectCardsetDialogWithPreview(MfxDialog):
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = sh * .8
|
||||||
w1, w2 = min(300, sw / 4), max(sw / 2 + ((sw / 4) - 300), sw / 2)
|
w1, w2 = min(300, sw / 2.5), max(sw / 2 + ((sw / 2.5) - 300), sw / 2)
|
||||||
paned_window = ttk.PanedWindow(top_frame, orient='horizontal')
|
paned_window = ttk.PanedWindow(top_frame, orient='horizontal')
|
||||||
paned_window.pack(expand=True, fill='both')
|
paned_window.pack(expand=True, fill='both')
|
||||||
left_frame = ttk.Frame(paned_window)
|
left_frame = ttk.Frame(paned_window)
|
||||||
|
|
|
@ -356,7 +356,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = sh * .8
|
||||||
w1, w2 = min(250, sw / 3), max(sw / 2 + ((sw / 3) - 250), sw / 2)
|
w1, w2 = min(250, sw / 2.5), max(sw / 2 + ((sw / 2.5) - 250), sw / 2)
|
||||||
|
|
||||||
# print sw, w1, w2
|
# print sw, w1, w2
|
||||||
# w2 = max(200, min(w2, 10 + 12 * (app.subsampled_images.CARDW + 10)))
|
# w2 = max(200, min(w2, 10 + 12 * (app.subsampled_images.CARDW + 10)))
|
||||||
|
|
|
@ -132,7 +132,7 @@ class SelectTileDialogWithPreview(MfxDialog):
|
||||||
sh = self.top.winfo_screenheight()
|
sh = self.top.winfo_screenheight()
|
||||||
|
|
||||||
h = sh * .8
|
h = sh * .8
|
||||||
w1, w2 = min(250, sw / 4), max(sw / 2 + ((sw / 4) - 250), sw / 2)
|
w1, w2 = min(250, sw / 2.5), max(sw / 2 + ((sw / 2.5) - 250), sw / 2)
|
||||||
|
|
||||||
font = app.getFont("default")
|
font = app.getFont("default")
|
||||||
padx, pady = 4, 4
|
padx, pady = 4, 4
|
||||||
|
|
|
@ -99,6 +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)
|
||||||
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