feat(window): no minimum size

The window would not go below 1100x700. That was a fair guess at where
the layout stops being comfortable and no business of ours to enforce:
an operator wanting OpsLog as a narrow strip beside a decoder, parked on
a second screen, or on a small laptop, hit a wall with nothing to show
for it. The panels already scroll and collapse.

Zero is how Wails says "do not constrain" — winc fills PtMinTrackSize
only when the value is above zero, checked in the library rather than
assumed — so Windows applies its own floor, about the width of the
caption buttons, and nothing here adds to it.

Removing the constant meant three other users of it had to be sorted
out, since each wanted something different from "the minimum":

- The saved-geometry sanity check now has its own floor, 200x150. That
  is not a minimum the operator feels; it decides when a stored size is
  corrupt rather than chosen. A window restored at 0x0 cannot be grabbed
  to fix it, and that is the one state there is no way back from.
- The maximised-corner monitor check was passing the minimum AS a size,
  which would now be a zero-sized rectangle. It uses the saved size.
- Leaving compact mode validated its captured geometry against the
  minimum; it uses the sane floor.

SetCompactHeight keeps its 900 minimum: it returns early unless compact
is on, and leaving compact resets the minimum to none.
This commit is contained in:
2026-09-10 20:20:05 +02:00
parent fd93036f86
commit 9e67ddcea4
4 changed files with 62 additions and 13 deletions
+15 -5
View File
@@ -230,11 +230,21 @@ func main() {
bootLog("WebView2 profile: %q", webviewDataPath())
bootLog("entering wails.Run (window %dx%d, state %v)", width, height, startState)
err := wails.Run(&options.App{
Title: "OpsLog",
Width: width,
Height: height,
MinWidth: 1100,
MinHeight: 700,
Title: "OpsLog",
Width: width,
Height: height,
// No minimum. Wails treats 0 as "no constraint" (winc only fills
// PtMinTrackSize when the value is above zero), so Windows applies its
// own floor — about the width of the caption buttons — and the operator
// decides the rest.
//
// It was 1100x700, which is a fair guess at where the layout stops being
// comfortable and no business of ours to enforce: a second screen used as
// a narrow strip, a window parked beside a decoder, a small laptop — all
// of them ran into a wall with nothing to show for it. The panels already
// scroll and collapse.
MinWidth: 0,
MinHeight: 0,
WindowStartState: startState,
// No OS title bar: it was a dead 32-pixel band above a window that already
// has its own title strip. The app header takes over — it carries the drag