Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/emc/usr_intf/touchy/touchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,10 +851,13 @@ def _fit_to_monitor(self, win, event, scroller, child):
# Open at the content size, capped to the screen; this avoids an
# off-screen window without forcing a screen-sized minimum. A
# user-saved geometry (window_geometry pref) takes precedence.
# Floor the height at 500 px: the Startup tab is the smallest
# and would otherwise size the window to ~270 px tall and clip
# all the other tabs.
if self.window_geometry == "default":
nat = child.get_preferred_size()[1]
win.resize(min(nat.width, area.width),
min(nat.height, area.height))
target_h = min(max(nat.height, 500), area.height)
win.resize(min(nat.width, area.width), target_h)
GLib.idle_add(self._offer_fit, child, area)
except Exception:
pass
Expand Down
Loading