Files
DarkRoom/ui/dr-ui
dtourolleandClaude Opus 5 e7130ff891 Give the library header somewhere to put six buttons
A tablet in portrait is 1920 physical pixels at density 400 — 768 logical,
which is below the 820 breakpoint, so the library was already taking the
compact layout. The compact header simply was not compact: one flat
HorizontalLayout holding a menu button, a title, three status readouts and
six buttons.

Slint's HorizontalLayout has no wrap and no overflow. Given less width than
its children want it shrinks each to its minimum and lets the rest run past
the edge, so "Change library" arrived as "Change li…", the readouts elided to
nothing useful, and the row overflowed anyway.

The six actions move into a `HeaderActions` component drawn in one of two
places: inline in the header when expanded, and in a disclosure row under it
behind a "More" button when compact. One component rather than two copies,
because the alternative is six buttons with their visibility rules and
callbacks written twice, and the copy that rots is the one behind a
disclosure nobody opens while testing.

The row closes itself when the window widens, so rotating to landscape does
not leave a stray toolbar behind. "More" is a word rather than an ellipsis
glyph: "⋯" sitting in a header of elided labels reads as one more truncation,
which is the failure this change exists to remove.

`LibraryGrid` takes `expanded` to decide, from the window width rather than
the device (FR-UI-1) — so a narrow desktop window gets the same treatment.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 23:04:06 +02:00
..