Scroll the develop column as one, histogram and all
Only the sliders scrolled. The capture metadata, the histogram, the geometry controls and copy-and-paste all sat above them in a fixed layout, so on a 280px column in portrait they took the height the sliders needed — and the histogram, which is the instrument the sliders are judged against, could neither be scrolled to nor scrolled past. The Flickable moves out of `AdjustPanel` and around the whole column. Nesting one inside the other was not an option: a slider drag already has to be won against one scroller, and a second would give it a third thing to be lost to. `slider-dragging` becomes an `out` property for the same reason. The arbitration is unchanged and still necessary — a track stands the scroller down as soon as a finger touches it, or every attempt to drag a slider would scroll the column instead — but the scroller obeying it now lives a level up. The scroll gutter stays where it is, as padding inside the content: it is what guarantees somewhere to put a thumb that means "scroll" and nothing else, and it matters more now that it serves the entire column. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -648,7 +648,12 @@ export component AdjustPanel inherits Rectangle {
|
||||
// competing for it. See the long note on `ParamSlider`'s `claimed`: without
|
||||
// this the Flickable takes any drag that drifts 8px vertically, which under
|
||||
// a finger is every drag.
|
||||
private property <bool> slider-dragging: false;
|
||||
/// True while a track has claimed a gesture.
|
||||
///
|
||||
/// `out` rather than private because the Flickable that must stand down
|
||||
/// for it is no longer in this component: the whole develop column
|
||||
/// scrolls as one, so the panel reports the drag and the column obeys it.
|
||||
out property <bool> slider-dragging: false;
|
||||
|
||||
VerticalLayout {
|
||||
padding: Theme.gap;
|
||||
@@ -672,10 +677,13 @@ export component AdjustPanel inherits Rectangle {
|
||||
|
||||
if !root.enabled: Caption { text: "No image"; }
|
||||
|
||||
if root.enabled: Flickable {
|
||||
viewport-height: content.preferred-height;
|
||||
interactive: !root.slider-dragging;
|
||||
|
||||
// No Flickable here any more. The histogram, the capture metadata and
|
||||
// the geometry controls sat *above* this one and could not be scrolled
|
||||
// away, so on a 280px column in portrait they ate the height the
|
||||
// sliders needed and the instrument the sliders are judged against was
|
||||
// unreachable. The column scrolls as one now, and a scroller inside a
|
||||
// scroller would give every drag a third thing to be lost to.
|
||||
if root.enabled: VerticalLayout {
|
||||
content := VerticalLayout {
|
||||
spacing: 0px;
|
||||
alignment: start;
|
||||
|
||||
+23
-3
@@ -1570,8 +1570,28 @@ in property <bool> panel-visible: true;
|
||||
width: root.panel-visible ? 280px : 0px;
|
||||
visible: root.panel-visible;
|
||||
background: Theme.surface;
|
||||
clip: true;
|
||||
|
||||
VerticalLayout {
|
||||
// **The whole column scrolls, histogram included.**
|
||||
//
|
||||
// Only the sliders used to. Everything above them — the
|
||||
// capture metadata, the histogram, the geometry controls,
|
||||
// copy and paste — was fixed, so on a 280px column in
|
||||
// portrait they took the height the sliders needed and the
|
||||
// histogram could not be moved out of the way. It is the
|
||||
// instrument the sliders are judged against; being unable
|
||||
// to scroll to it, or past it, is the worst of both.
|
||||
//
|
||||
// `interactive` stands down while a track has a gesture,
|
||||
// the same arbitration `AdjustPanel` used to do for its own
|
||||
// scroller — see the note on `SliderTrack`'s `claimed`.
|
||||
// Without it every attempt to drag a slider would scroll
|
||||
// the column instead.
|
||||
Flickable {
|
||||
viewport-height: column.preferred-height;
|
||||
interactive: !adjust.slider-dragging;
|
||||
|
||||
column := VerticalLayout {
|
||||
InfoPanel {
|
||||
camera: root.camera;
|
||||
exposure: root.exposure;
|
||||
@@ -1644,8 +1664,7 @@ in property <bool> panel-visible: true;
|
||||
background: Theme.rule;
|
||||
}
|
||||
|
||||
AdjustPanel {
|
||||
vertical-stretch: 1;
|
||||
adjust := AdjustPanel {
|
||||
rows: root.adjust-rows;
|
||||
enabled: root.adjust-enabled;
|
||||
curve-samples: root.curve-samples;
|
||||
@@ -1664,6 +1683,7 @@ in property <bool> panel-visible: true;
|
||||
op-reset(op) => { root.curve-reset(op); }
|
||||
reset-all => { root.reset-all(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user