mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
Lightroom Classic's histogram is a control surface: its plot is split into five
tonal zones and each one moves the Basic control it names. The Edit panel's
histogram now does the same, wired through the engine like every slider.
- Zones: Blacks 0.00-0.15, Shadows 0.15-0.35, Exposure 0.35-0.65, Highlights
0.65-0.85 and Whites 0.85-1.00 of the plot's width, each naming the develop
control it adjusts (light.blacks ... light.whites), so its range, default and
steps are the panel's own control specs -- no copy of them.
- The zone the press landed in stays locked for the whole drag (the new
Gesture::HistogramDrag), so the pointer may cross the others without switching
control. The strip under the plot (the readout and the EXIF line) and the
clipping buttons in the plot's top corners are not zones.
- A sideways drag dispatches develop.set between develop.beginInteraction and
develop.endInteraction -- the sliders' own path -- so the draft render follows
the drag live, nothing is committed while it goes on, and the release lands the
whole drag as one undo step. Travel of the plot's width sweeps the control's
whole range (Shift a tenth, as the sliders' fine drag) and clamps to its spec;
the unrounded value is carried from frame to frame so a slow drag adds up
rather than rounding back to the step it already has, and the first reported
frame takes the whole travel from the press, since egui withholds a drag until
the pointer has left its click threshold.
- Hovering a zone tints it and names it with its value in the strip under the
plot ("Exposure: +0.45 EV"), replacing the EXIF line, and the pointer shows the
sideways-resize cursor. A double-click in a zone puts that control back to its
default in one undo step.
Tests: the zone mapping at every boundary, the tiling and the controls' specs,
the drag/rounding/clamping arithmetic (hostile input included) and the readout
wording; end to end through the control channel: a drag per zone, the zone lock
across the plot, the Shift ratio, clamping at both ends, live dispatch with one
undo step on the release, the double-click reset, the hover highlight, readout
and cursor, and a drag on the readout strip or clipping chevrons changing nothing.
Docs: the tracker's LRC-DEV-HISTOGRAM-DRAG row added and LR-VIEW-HISTOGRAM's
"no drag-to-adjust" note replaced, with the summary regenerated by
`cargo xtask parity --write`; a dated entry in docs/whats-new.md.
Sources: own design; the zone layout and Lightroom Classic's histogram-region
behaviour as the reference (observed read-only).
Co-Authored-By: deepseek-flash <noreply@deepseek.com>