Give the canvas tools a rail of their own, and the column one width
Build and test / Desktop (Linux) (push) Failing after 1h14m38s
Build and test / Layer separation (push) Successful in 48s
🐳 Android image / Build and push (push) Successful in 16m30s
Build and test / android-image (push) Successful in 16m31s
Traceability / Requirement traces (push) Successful in 1m47s
Build and test / Android (aarch64) (push) Successful in 1h0m21s

Crop, Local and Repair were chips at the head of the develop column, sharing a
row with the adjustment groups and told apart from them by the shape of their
highlight. Three things followed from that, and only the last is cosmetic: the
column closes, so the way out of a mode went away with the way in — hence the
duplicate "Done Cropping" over the canvas; the chips are generated from the
operation set, so the widest thing in the sidebar was a row nobody had chosen
the contents of; and a mode and a filter are different kinds of state wearing
one control.

They are a fixed 60px rail down the left now, generated from a single table in
toolrail.slint. A tool is one row of it plus a drawing plus a ViewMode variant;
nothing in app.slint is touched to add one. What is left of the strip is the
group filters, so it is GroupStrip.

The column stops measuring itself. Every panel published a content-width and
declared it as min-width, and the column took the largest — which spent the
photograph's pixels on whatever happened to be widest, and moved the image
sideways when switching tools swapped one set of panels for another. It is
panel-width now, one number in style.yaml.

That number is 360 and it is measured, not picked: the contents report a
minimum of 344 in every mode, and they do not compress below it because a Text
that does not elide reports the same minimum as preferred. 320 was tried and
sliced Paste down the middle. The Flickable's viewport is floored at the
layout's minimum rather than its preferred width for the same reason — content
that is never told how much room it has cannot adapt to having less.

Removing the eight content-width declarations repairs three comments an
earlier edit had spliced sentences into. The raw histogram's note on keeping
its hint short is rewritten rather than dropped: an over-long hint no longer
widens the column, it pushes the column's minimum past the width it has and
clips the panel, which makes that constraint sharper rather than obsolete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-30 09:59:50 +02:00
co-authored by Claude Opus 5
parent 9e519eb8a6
commit ef07e6ca3e
15 changed files with 563 additions and 312 deletions
+20 -18
View File
@@ -77,8 +77,12 @@ export struct HistogramView {
// FR-CULL-3 is written for.
//
// Kept short in Rust, and that is a layout constraint: `FieldRow` draws
// the hint as an unwrapped Text, so its natural width becomes this panel's
// preferred width and the develop column takes the largest of those.
// the hint as an unwrapped Text, and a Text that does not elide reports
// the same *minimum* width as preferred. The develop column no longer
// takes the largest of those — it is a mandated `panel-width` — which
// makes this constraint sharper rather than softer: an over-long hint no
// longer widens the column, it pushes the column's minimum past the width
// it has and clips the panel instead.
hint: string,
// What the plot says when there is nothing to draw. Never "0%" and never
@@ -183,22 +187,20 @@ export component HistogramPanel inherits Rectangle {
/// two above it, so there is exactly one place the choice is made.
property <HistogramView> shown: root.mode == 1 ? root.raw-data : root.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;
// **This panel does not get a say in how wide the column is.**
//
// It used to: every panel in the develop column published a
// `content-width`, the column took the largest, and that was the whole of
// how the column was sized. The trouble is what the column is next to. A
// sidebar measured from its contents takes its width out of the
// photograph, so an axis label gaining a digit made the picture smaller,
// and switching tools swapped one set of panels for another and moved the
// image sideways on the screen.
//
// The column is `panel-width` now, stated once in `style.yaml`. A panel
// that wants more than that clips, and the Flickable the column puts
// around this is what makes the rest reachable. See the `_develop` note in
// `style.yaml` for the trade.
background: transparent;
height: panel.preferred-height;