Let the develop column ask how wide it needs to be
Build and test / Desktop (Linux) (push) Successful in 21m53s
Build and test / Layer separation (push) Successful in 28s
Traceability / Requirement traces (push) Successful in 32s
🐳 Android image / Build and push (push) Successful in 3s
Build and test / android-image (push) Successful in 3s
Build and test / Android (aarch64) (push) Failing after 53m45s
Build and test / Desktop (Linux) (push) Successful in 21m53s
Build and test / Layer separation (push) Successful in 28s
Traceability / Requirement traces (push) Successful in 32s
🐳 Android image / Build and push (push) Successful in 3s
Build and test / android-image (push) Successful in 3s
Build and test / Android (aarch64) (push) Failing after 53m45s
The column was 280px, a number chosen for a tablet, with 380px bolted on later for a desktop. Both were guesses at how much room the widest row inside needs, and a guess is what cannot work here: the mode strip is one chip per attribute the *operation set declares*, so the row is generated and no constant in app.slint can track it. When the guess came up short the failure was not a tidy clip. The Flickable inside the column never had its `viewport-width` set, so the viewport took its content's preferred width, and a viewport wider than its Flickable is *centred* in it — the same rule the note on the seam's `x: 0` already records a few lines below. So the column lost half of each edge rather than one of them: "HISTOGRAM" read "ISTOGRAM", "Straighten" read "aighten", Copy sat centred while Paste ran off the far side. It looked like a rendering fault and it was an alignment one. So the column asks instead of guessing. Every panel that can appear in it — image, histogram, geometry, settings transfer, masks, repairs, adjust, history — now publishes a `content-width`: how wide it has to be before it starts clipping itself, read off its own layout rather than asserted. Each declares that as its `min-width` too, and that is what makes the aggregation automatic: `column` is a layout, so it already reports the largest minimum among its children, and it does so for the panels that come and go with the mode as well, which live inside `if`s and cannot be named from outside. Grep `content-width` in ui/dr-ui/ui to see every panel with a say in the answer. The mode strip is named explicitly only because it is pinned outside that layout, so nothing else measures it. There is no floor left. A floor is one more guess and the panels state their own minimums now. The only thing still above the measurement is `panel-max-width`, which is not a size but a policy — a column may not take the window from the photograph it exists to serve — and it comes from Rust beside `layout-class` because a width read from `root.width` inside the layout that `root.width` depends on is a binding loop. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,22 @@ component ClipReadout inherits HorizontalLayout {
|
||||
export component HistogramPanel inherits Rectangle {
|
||||
in property <HistogramView> data;
|
||||
|
||||
|
||||
/// TRACES: FR-UI-2
|
||||
/// How wide this panel has to be before it starts clipping itself.
|
||||
///
|
||||
/// Every panel in the develop column declares one, and the column takes
|
||||
/// the largest — that is the whole of how the column is sized. It replaced
|
||||
/// two guessed constants (280px for a tablet, 380px for a desktop) that
|
||||
/// could not track a panel gaining a control, and did not.
|
||||
///
|
||||
/// Published as `min-width` as well as read by name: the first is what
|
||||
/// makes the enclosing layout aggregate these automatically, including for
|
||||
/// the panels that come and go with the mode and so cannot be referenced
|
||||
/// from outside their `if`.
|
||||
out property <length> content-width: panel.preferred-width;
|
||||
min-width: root.content-width;
|
||||
|
||||
background: transparent;
|
||||
height: panel.preferred-height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user