LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
LR-VIEW-HISTOGRAM: the histogram stays in view while the Edit panel's sliders scroll (#2679)
Bruno-Alumn3862e5e91017
diff --git a/crates/ui-egui/src/panels/edit.rs b/crates/ui-egui/src/panels/edit.rsindex 08f70bd02..62826a0fb 100644--- a/crates/ui-egui/src/panels/edit.rs+++ b/crates/ui-egui/src/panels/edit.rs@@ -96,9 +96,6 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {}let preview_only = app.session.catalog.photo(id).and_then(|p| p.preview_only.clone());- if app.ui.histogram {- histogram(app, ui, id);- }if app.ui.soft_proof {soft_proofing(app, ui, id);}@@ -606,7 +603,9 @@ fn steady_hdr_histogram(ctx: &egui::Context, id: PhotoId, hdr_edit: bool, hist:}}-fn histogram(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {+/// The histogram, its clipping buttons and the EXIF strip, drawn above the Edit panel's scrolling sliders+/// ([`super::right::show`]).+pub fn histogram(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {let t = Tokens::get(ui.ctx());let w = ui.available_width();let hdr_edit = app.session.develop_of(id).is_some_and(|d| d.hdr.enabled);@@ -721,8 +720,8 @@ fn histogram(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {}}let mut clicked = resp.clicked();- // the panel's floating scroll bar widens over the right edge when hovered: both buttons keep- // clear of it, the left one too so they stay symmetric (#1640)+ // both buttons keep clear of the panel's right edge, where its floating scroll bar widens when+ // hovered beside the sliders, the left one too so they stay symmetric (#1640)let scroll = ui.spacing().scroll;let inset = 20.0 + scroll.bar_width + scroll.bar_outer_margin;for (name, x, label, clipped) in [diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rsindex 76ecc746a..6f2ae0121 100644--- a/crates/ui-egui/src/panels/right.rs+++ b/crates/ui-egui/src/panels/right.rs@@ -40,6 +40,11 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui) {}return;};+ // the Edit panel's histogram stays above its sliders as they scroll (#2679)+ if app.ui.right == RightPanel::Edit && app.ui.histogram {+ ui.spacing_mut().item_spacing.y = 0.0;+ super::edit::histogram(app, ui, id);+ }let mut area = egui::ScrollArea::vertical().id_salt("right-scroll").auto_shrink([false, false]);if let Some(offset) = held {area = area.vertical_scroll_offset(offset);diff --git a/crates/ui-egui/src/tests_panels.rs b/crates/ui-egui/src/tests_panels.rsindex 96b0a1a9d..857855b2e 100644--- a/crates/ui-egui/src/tests_panels.rs+++ b/crates/ui-egui/src/tests_panels.rs@@ -2569,6 +2569,30 @@ fn histogram_corners_toggle_clipping_warnings() {assert!(!h.app.ui.show_clipping);}+/// Issue #2679: the histogram stays at the top of the Edit panel while its sliders scroll under it.+#[test]+fn the_histogram_stays_in_view_while_the_sliders_scroll() {+ let mut h = demo(+ [1400.0, 700.0],+ json!({"view": "detail", "right": "edit", "histogram": true, "openSections": ["light", "color", "effects", "detail", "optics"]}),+ );+ let (hist, exposure) = (widget(&h, "histogram"), widget(&h, "slider:light.exposure"));+ let panel = widget(&h, "panel:right_panel");+ let r = h.request("ui.move", json!({"x": panel.center().x, "y": panel.bottom() - 40.0}), T);+ assert_eq!(r["ok"], true, "{r}");+ for _ in 0..4 {+ let r = h.request("ui.scroll", json!({"dy": -300.0}), T);+ assert_eq!(r["ok"], true, "{r}");+ }+ h.step();+ let moved = h.app.widgets.iter().find(|(w, _)| w == "slider:light.exposure").map(|(_, r)| *r);+ assert!(moved.is_none_or(|r| r.top() < exposure.top() - 100.0), "the sliders scrolled: {exposure:?} → {moved:?}");+ assert_eq!(widget(&h, "histogram"), hist, "the histogram stayed where it was");+ for id in ["histogram:shadows", "histogram:highlights"] {+ assert!(hist.contains_rect(widget(&h, id)), "{id} is still on the histogram");+ }+}+#[test]fn the_histogram_clipping_buttons_stay_clear_of_the_hovered_scroll_bar() {// every section open: the Edit panel scrolls, so its scroll bar runs past the histogramdiff --git a/docs/parity-checklist.md b/docs/parity-checklist.mdindex 21140ae26..a149c42f5 100644--- a/docs/parity-checklist.md+++ b/docs/parity-checklist.md@@ -1,6 +1,6 @@# Lightroom parity checklist-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-21 · **Change:** minor (LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-23 · **Change:** minor (LR-VIEW-HISTOGRAM: the histogram stays in view while the Edit panel's sliders scroll, #2679; LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6The measured, row-by-row checklist: one row per Lightroom feature, menu item and shortcut, what wehave and what is missing. It answers *does the feature exist?* (feature breadth). Whether it is good@@ -139,7 +139,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts).| LR-VIEW-SLIDESHOW | Slideshow | P2 | ✅ | `cmd:view.slideshow` | View ▸ Slideshow (⌥⌘↩): the photos in view full screen from the selected one, played with the library's playback settings (see LRC-SS-PLAYBACK: fades, random order, repeat, previews prepared ahead; `interval` / any setting overrides one run); Space pauses, ←/→ step (a cut), Esc ends; playback controls on pointer movement || LR-VIEW-SECONDWINDOW | Second display window [Classic] | P2 | ✅ | `cmd:view.secondWindow`, `crates/ui-egui/src/panels/second.rs` | Window ▸ Second Window (⌘F11): the active photo fitted in its own native window with its own render (a floating panel where there are no native windows); loupe view only (no grid / compare / survey there) || LR-VIEW-CLIPPING | Clipping indicators | P0 | ✅ | `cmd:view.clipping` | |-| LR-VIEW-HISTOGRAM | Histogram | P0 | ✅ | `cmd:view.histogram`, `crates/ui-egui/src/panels/edit.rs`, `crates/pipeline/src/lib.rs` (`hdr_histogram`) | HDR edits: SDR on the left half, the HDR range (0 to 5 stops above SDR white, a fixed scale) on the right with the headroom limit marked; colour bar (white, or Visualize HDR range's colours when that is on) and SDR / HDR labels; no drag-to-adjust on the histogram; it follows slider drags live (a small render beside the drafts, `Slot::HdrHistogram`) and never drops to the SDR layout mid-drag |+| LR-VIEW-HISTOGRAM | Histogram | P0 | ✅ | `cmd:view.histogram`, `crates/ui-egui/src/panels/edit.rs`, `crates/ui-egui/src/panels/right.rs`, `crates/pipeline/src/lib.rs` (`hdr_histogram`) | stays at the top of the Edit panel while its sliders scroll under it (issue #2679, `the_histogram_stays_in_view_while_the_sliders_scroll`); HDR edits: SDR on the left half, the HDR range (0 to 5 stops above SDR white, a fixed scale) on the right with the headroom limit marked; colour bar (white, or Visualize HDR range's colours when that is on) and SDR / HDR labels; no drag-to-adjust on the histogram; it follows slider drags live (a small render beside the drafts, `Slot::HdrHistogram`) and never drops to the SDR layout mid-drag || LR-VIEW-HDR-DISPLAY | HDR display output | P2 | ⬜ | |, `apps/lightcraft/src/hdr_display.rs` (`choose`, `preferred_hdr_format`) | SDR/HDR decision (platform, surface format, OS headroom, `LIGHTCRAFT_HDR_DISPLAY=0`) is unit-tested and logged at start; always SDR today because eframe configures an 8-bit surface; no OS headroom query yet; |## D. Search & filter (FILT)@@ -798,6 +798,7 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove| Date | Change | Summary ||---|---|---|+| 2026-10-23 | patch | LR-VIEW-HISTOGRAM: the histogram stays at the top of the Edit panel while its sliders scroll (#2679); status unchanged || 2026-10-21 | patch | LR-IMP-ADD-DIALOG: reconcile #2362 with current main; deleted-album guard and hierarchical picker retained; counts unchanged || 2026-10-20 | minor | LR-IMP-ADD-DIALOG: #2362 gives the import review the shared hierarchy/search album picker while retaining None/New album and existing destination IDs; status and feature counts unchanged || 2026-10-21 | patch | KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the slider's row; leaving it (even between two frames) or Tab focus alone does not arm them (issue #1355); status unchanged |diff --git a/docs/whats-new.md b/docs/whats-new.mdindex cffff83e2..0848c987f 100644--- a/docs/whats-new.md+++ b/docs/whats-new.md@@ -1,5 +1,11 @@# What's new in LightCraft+## 2026-10-23++### The histogram stays in view+- The histogram stays at the top of the Edit panel while its sliders scroll under it (issue #2679). It used to scroll+ away with them, so it was out of sight while using the sliders further down the panel.+## 2026-10-21### Sharper resampling in HDR and panorama merges