Measure the rail by counting it, so it can scroll instead of clipping

With the adjustment groups in the rail, a short window silently lost them.
At a 1500x680 window the rail drew Photo, Compose, Local, Repair, the seam and
"All", and then stopped: Optics, Light, Colour, Effects and Detail were not
scrolled off, they were gone, with nothing on screen to say so. The develop
view's primary navigation, unreachable by any means.

The Flickable was put here to prevent exactly that, and it could not, because
its viewport asked the layout how tall it wanted to be while the layout was
already taking its height from the viewport. Slint settles that cycle by
handing back the height it was given, so `max(self.height, preferred-height)`
could never exceed `self.height` and there was never anything to scroll.

Counting breaks the cycle. Every entry here is a fixed height by construction —
a tool is `rail-entry-height`, a group is a touch target — so the content is
six plus four fifty-fours plus a gap plus a touch target for each group and
"All", which is exact rather than an estimate and depends on nothing that
depends on it. Four tools and five groups come to 498, against the 340 a
680-pixel window leaves at 2x, and the difference is now scrollable rather
than absent.

Found by shrinking the window with the groups forced into the rail. The
interaction itself is unverified: synthetic input does not reach a Slint
window on this desktop, and the tablet was disconnected, so what is confirmed
is the arithmetic and the clipping it explains, not the scrolling it should
restore.
This commit is contained in:
2026-09-07 00:17:08 +02:00
parent 3dc7c184ee
commit 2cd49d1cb7
3 changed files with 126 additions and 57 deletions
+63 -13
View File
@@ -5,82 +5,132 @@
Every entry here is extracted from the comment beside the code that implements it, so this file cannot describe a gesture the application does not have. Add one by writing a `GESTURE:` block next to the implementation; there is nowhere else to write it.
17 gestures, in 2 places.
29 gestures, in 3 places.
30 gestures, in 3 places.
## Develop
### Set the white balance from the photograph
- **Touch** — Press "pick" in the group's heading, then tap something neutral in the picture
- **Pointer** — Press "pick", then click something neutral
Sampling a neutral is the first move of the tonal pass — every colour judgement afterwards is measured against where the grey was put — and guessing at two sliders until a wall stops looking green is the wrong way round. One click is one sample and one step to undo; the sliders stay, because a sampled neutral is where the decision starts rather than where it ends.
<sub>`ui/dr-ui/ui/adjust.slint:157`</sub>
### Magnify the photograph by any amount
- **Touch** — Pinch it with two fingers
- **Pointer** — The scroll wheel over it
Anchored on the fingers' midpoint, and on the pointer, so the gesture reads as magnifying the picture rather than sliding it about. Double-tap is the way to an exact 1:1; this is the way to everything in between.
<sub>`ui/dr-ui/ui/app.slint:1981`</sub>
<sub>`ui/dr-ui/ui/app.slint:1990`</sub>
### Move a magnified photograph about
- **Touch** — Drag it
- **Pointer** — Drag it
Only once there is something outside the viewport to reach, which is why the cursor becomes a hand exactly then. The view is clamped to the frame: panning past the edge would show undefined area beside the photograph, and that reads as a rendering fault rather than as the end of the picture.
<sub>`ui/dr-ui/ui/app.slint:2134`</sub>
<sub>`ui/dr-ui/ui/app.slint:2143`</sub>
### Take back the last change
- **Touch** — Tap the step above the current one in the History list
- **Pointer** — Click it, or press Undo in the History header
- **Keyboard** — Ctrl+Z
A whole drag is one step, so undo takes back a decision rather than a frame of a gesture. The list is there because arriving six steps back costs what arriving from one does.
<sub>`ui/dr-ui/ui/app.slint:2301`</sub>
<sub>`ui/dr-ui/ui/app.slint:2310`</sub>
### Do it again after taking it back
- **Touch** — Tap the step below the current one in the History list
- **Pointer** — Click it, or press Redo in the History header
- **Keyboard** — Ctrl+Shift+Z
<sub>`ui/dr-ui/ui/app.slint:2314`</sub>
<sub>`ui/dr-ui/ui/app.slint:2323`</sub>
### Copy the settings from this photograph
- **Touch** — Press Copy in the Settings panel
- **Pointer** — Press Copy in the Settings panel
- **Keyboard** — Ctrl+C
The panel is the copy that has to work: a tablet has no modifier key to hold and no menu bar to hang the action from. The shortcut is an accelerator for a control that is on screen either way.
<sub>`ui/dr-ui/ui/app.slint:2347`</sub>
<sub>`ui/dr-ui/ui/app.slint:2356`</sub>
### Paste the settings onto this photograph
- **Touch** — Press Paste in the Settings panel
- **Pointer** — Press Paste in the Settings panel
- **Keyboard** — Ctrl+V
The button names what would be pasted — "3 adjustments", and whether the crop is coming with it — which the shortcut cannot say. Both paste the same scope.
<sub>`ui/dr-ui/ui/app.slint:2359`</sub>
<sub>`ui/dr-ui/ui/app.slint:2368`</sub>
### Change which group of adjustments is on screen
- **Touch** — Tap a group in the rail down the left
- **Pointer** — Click a group in the strip above the develop column
- **Keyboard** — [ and ] step through them, wrapping round through "everything"
The groups are whatever the operation set declares itself to be about, so there are as many as the pipeline has and no key can be assigned to one of them by name. Stepping is the binding that survives a node being added.
<sub>`ui/dr-ui/ui/app.slint:2387`</sub>
<sub>`ui/dr-ui/ui/app.slint:2396`</sub>
### Look at the photograph at 1:1
- **Touch** — Double-tap the photograph
- **Pointer** — Double-click it, or press the zoom readout floating over the canvas
- **Keyboard** — Z
Noise reduction and capture sharpening are judgements about single pixels, and a fitted view averages several of the file's into each one on screen — so the frame looks softer than it is and the correction goes too far. The point and the magnification survive opening the next photograph, which is what makes checking the same eye across forty portraits forty keystrokes rather than forty pans.
<sub>`ui/dr-ui/ui/app.slint:2422`</sub>
<sub>`ui/dr-ui/ui/app.slint:2431`</sub>
### Move to the next or previous photograph
- **Touch** — Tap a frame in the roll along the foot of the canvas
- **Pointer** — Click a frame in the roll
- **Keyboard** — Right arrow or space for the next, left arrow for the one before
The edit on screen is saved on the way out, so stepping through a folder is as much a departure as going back to the grid and loses nothing.
<sub>`ui/dr-ui/ui/app.slint:2452`</sub>
<sub>`ui/dr-ui/ui/app.slint:2461`</sub>
### See the photograph before you edited it
- **Touch** — Press and hold "Before"
- **Pointer** — Press and hold "Before"
- **Keyboard** — Hold \
Held rather than toggled, and no split screen: a split halves the working image on the tablet the column was sized for, and the comparison photographers describe making is a flick back and forth. It takes no history step, so checking whether a frame is overcooked costs nothing to undo afterwards.
<sub>`ui/dr-ui/ui/app.slint:2576`</sub>
<sub>`ui/dr-ui/ui/app.slint:2585`</sub>
### Put one control back to its default
- **Touch** — Double-tap its track
- **Pointer** — Double-click its track, or right-click it
The column is 280px wide and the colour mixer alone puts thirty-six of these in it, so a reset button per row would be most of the width. Two ways in with a pointer because right-click is the one a hand already reaches for and double-click is the one that needs no second button. A group's own reset is in its heading; this is the single control.
<sub>`ui/dr-ui/ui/controls.slint:294`</sub>
### Show or hide one mask layer
- **Touch** — Tap the ring at the head of its row
- **Pointer** — Click the ring at the head of its row
Disabling a layer is the before-and-after a local edit constantly wants, so it is one press away rather than inside the row. It is an edit and does take a history step, unlike holding "Before" — the layer really is off until it is switched back on.
<sub>`ui/dr-ui/ui/masks.slint:137`</sub>
<sub>`ui/dr-ui/ui/masks.slint:163`</sub>
## People
+40 -43
View File
File diff suppressed because one or more lines are too long
+23 -1
View File
@@ -176,11 +176,33 @@ export component ToolRail inherits Rectangle {
// count is no longer written here, and a rail that overflows loses its
// last entries silently, on the one control the develop view is navigated
// by.
// **How tall the entries actually are, counted rather than measured.**
//
// This used to read `max(self.height, layout.preferred-height)`, with the
// layout below taking its height from the viewport in turn. That is a
// cycle — the viewport asks the layout how tall it wants to be, and the
// layout has already been told — and Slint settles it by handing back the
// height it was given. The viewport then never exceeded the visible area,
// so there was nothing to scroll and everything past the fold was clipped
// in silence: at a 680px window the rail stopped after "All" and the five
// groups below it could not be reached by any means.
//
// Counting works because every entry in this rail is a fixed height by
// construction — a tool is `rail-entry-height` and a group is a touch
// target, both stated a few lines below — so this is exact rather than an
// estimate, and it depends on nothing that depends on it.
private property <length> content-height:
Theme.gap-sm
+ root.tools.length * Theme.rail-entry-height
+ (root.groups-in-rail
? Theme.gap + Theme.touch-target * (1 + root.rail-tabs.length)
: 0px);
Flickable {
width: 100%;
height: 100%;
viewport-width: self.width;
viewport-height: max(self.height, layout.preferred-height);
viewport-height: max(self.height, root.content-height);
layout := VerticalLayout {
height: parent.viewport-height;