1
0
Fork 0
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:
Joe R 2021-09-09 20:09:29 -04:00
parent 87c8160761
commit 13d34238e2
4 changed files with 4 additions and 3 deletions

View file

@ -231,7 +231,7 @@ class SelectCardsetDialogWithPreview(MfxDialog):
sh = self.top.winfo_screenheight()
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.pack(expand=True, fill='both')
left_frame = ttk.Frame(paned_window)

View file

@ -356,7 +356,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
sh = self.top.winfo_screenheight()
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
# w2 = max(200, min(w2, 10 + 12 * (app.subsampled_images.CARDW + 10)))

View file

@ -132,7 +132,7 @@ class SelectTileDialogWithPreview(MfxDialog):
sh = self.top.winfo_screenheight()
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")
padx, pady = 4, 4

View file

@ -99,6 +99,7 @@ class BaseSelectDialogTreeCanvas:
height = 25 * disty
if parent and parent.winfo_screenheight() >= 800:
height = 30 * disty
height = min(height, parent.winfo_screenheight() * .35)
self.lines = height // disty
self._calc_MfxTreeInCanvas().__init__(
self, parent, self.data.rootnodes,