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>
This commit is contained in:
@@ -800,6 +800,11 @@ export component AppWindow inherits Window {
|
||||
|
||||
LibraryGrid {
|
||||
horizontal-stretch: 1;
|
||||
// FR-UI-1: the header collapses its actions behind a
|
||||
// disclosure below the breakpoint. A tablet in portrait is
|
||||
// 768 logical pixels, which fits the title and the status
|
||||
// readouts but not six buttons beside them.
|
||||
expanded: root.expanded;
|
||||
cells: root.library-cells;
|
||||
total: root.library-total;
|
||||
scanning: root.library-scanning;
|
||||
|
||||
Reference in New Issue
Block a user