fix(compact): size the window to the strip instead of a tuned constant

compactH was 158px, "tuned so the compact entry strip fits in a single row".
A constant tuned against a layout stops being true the moment the layout
changes, and this one outlived a strip that had since shrunk — leaving about
70px of empty window under the fields.

The frontend now measures what it rendered and asks for that height, watched by
a ResizeObserver so a strip that wraps at a narrow width is followed too. The
topbar is added as its declared h-8 rather than measured, since it is fixed.

Bounded in the backend: a measurement of zero — a layout not yet painted —
must not collapse the window, and the call is ignored unless compact is on so
nothing can shrink the normal window. Rounded to whole pixels so a sub-pixel
reflow cannot start a resize loop.
This commit is contained in:
2026-08-13 11:54:09 +02:00
parent 8fccfa29b1
commit 93879a0ce1
5 changed files with 60 additions and 4 deletions
+4
View File
@@ -1918,6 +1918,10 @@ export function SetClusterAutoConnect(arg1) {
return window['go']['main']['App']['SetClusterAutoConnect'](arg1);
}
export function SetCompactHeight(arg1) {
return window['go']['main']['App']['SetCompactHeight'](arg1);
}
export function SetCompactMode(arg1) {
return window['go']['main']['App']['SetCompactMode'](arg1);
}