Skip to content

touchy: open at a sensible minimum window height#4170

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:touchy-min-height
Jun 16, 2026
Merged

touchy: open at a sensible minimum window height#4170
grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:touchy-min-height

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Summary

Touchy sizes its window to the active notebook tab's preferred size on first map. The Startup tab (the default) is the smallest of the six, so the window opens around 984x274 and the other tabs (Status, Auto, Preferences) are clipped until the user resizes manually.

Floor the initial height at 500 px in _fit_to_monitor's default branch so every tab is usable out of the box, capped at the work area so we never open off-screen. A 600 px touchscreen panel with a top and bottom bar still has room; on a smaller display the existing monitor cap keeps the window on-screen. The minimum size request is untouched so the user can still resize smaller.

@andypugh I need this to see touchy in a representative state in the ui-smoke confirm shots (the test runs touchy at 1024x600, the common 7" panel size). Planning to merge so I can keep building out the ui-smoke tests on top.

Test plan

  • Boot touchy at 1920x1080: window opens at 984x500 (was 984x274), Status / Auto / Preferences tabs all show their content
  • Boot touchy at 1024x600: window opens at 984x500, fills the panel, no "Shrink to fit and save" InfoBar
  • Boot touchy at 800x600: window opens at 800x500, InfoBar offers shrink as before
  • User can still resize the window below 500 px tall after launch

Touchy sizes its window to the active notebook tab's preferred size
on first map. The Startup tab is the smallest of the six (just the
MPG wheel and Cycle Start), so the window opens around 984 by 274
pixels and the other tabs (Status, Auto, Preferences) are clipped
until the user resizes manually.

Floor the initial height at 500 pixels in _fit_to_monitor's default
branch so all tabs are usable out of the box, capped at the work
area so we never open off-screen. A 600 pixel touchscreen panel
with a top and bottom bar still has the room; on a smaller display
the existing monitor cap keeps the window on-screen. The minimum
size request is untouched, so the user can still resize smaller.
@grandixximo grandixximo merged commit 175bf47 into LinuxCNC:master Jun 16, 2026
12 of 15 checks passed
grandixximo added a commit to grandixximo/linuxcnc that referenced this pull request Jun 16, 2026
LinuxCNC#4170 floors the touchy window height at 500 px so all
notebook tabs are usable on first launch. Refresh the committed
confirm reference so the ui-smoke comparison matches the new
patched layout instead of the old ~270 px window.

Also drop the fit screen size from 1024x768 to 1024x600: 1024x600 is
the 7" touchscreen panel touchy actually targets, and the new 500 px
floor still leaves room (touchy opens 984x500 inside 1024x600 so the
window-fit assertion passes).
grandixximo added a commit to grandixximo/linuxcnc that referenced this pull request Jun 16, 2026
LinuxCNC#4170 floors the touchy window height at 500 px so all
notebook tabs are usable on first launch. Refresh the committed
confirm reference so the ui-smoke comparison matches the new
patched layout instead of the old ~270 px window.

The reference is the exact image CI produces (taken from the
ui-smoke-screenshots artifact), so it carries CI's font stack and
the comparison starts from a zero baseline; a reference rendered on
a developer machine has slightly different text metrics and shifts
the whole layout a few pixels, ghosting every label in the diff.

Also drop the fit screen size from 1024x768 to 1024x600: 1024x600 is
the 7" touchscreen panel touchy actually targets, and the new 500 px
floor still leaves room (touchy opens 984x500 inside 1024x600 so the
window-fit assertion passes).
@BsAtHome

Copy link
Copy Markdown
Contributor

You merged this with failing CI?

@grandixximo

Copy link
Copy Markdown
Contributor Author

I merged before it failed, it didn't when merged.

@grandixximo

grandixximo commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

CI flaky not the PR issue

I'll be more patient next time, sorry 😞

@BsAtHome

Copy link
Copy Markdown
Contributor

Either way, you should wait for CI before you merge. If it is CI's fault, you can restart it and try again. If it is your fault, well, you know what that means...

@grandixximo

Copy link
Copy Markdown
Contributor Author

Yeah, I don't want a broken tree, I hate that too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants