Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge remote-tracking branch 'upstream/main' into HEAD

Bruno-Alumn9f7d4bcc1423
diff --cc crates/ui-egui/src/panels/edit.rs
index e4e759736,fb47fc148..a8e0c438f
--- a/crates/ui-egui/src/panels/edit.rs
+++ b/crates/ui-egui/src/panels/edit.rs
@@@ -17,63 -17,22 +17,23 @@@ use crate::state::RightPanel
use crate::theme::Tokens;
use crate::widgets::{BAND_COLORS, SliderOut, divider, flyout_row, hex, register, section_header, slider, text_button};
- /// Commit a slider interaction: begin → live updates → end, so a drag is one undo step.
- pub fn apply_slider_out(
- app: &mut LightcraftApp,
- spec: &ControlSpec,
- out: SliderOut,
- mut set: impl FnMut(&mut LightcraftApp, f64) -> Result<Value, String>,
- ) {
- if out.drag_started && !out.reset {
- let _ = app.run("develop.beginInteraction", json!({"label": spec.label}));
- app.ui.dragging_control = Some(spec.id.to_string());
- }
- if let Some(v) = out.value {
- let _ = set(app, v);
- }
- if out.drag_stopped || out.reset {
- let _ = app.run("develop.endInteraction", json!({}));
- app.ui.dragging_control = None;
- }
- }
-
- pub(crate) fn control(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings, id: &str, enabled: bool) {
- let Some(spec) = controls::find(id) else { return };
- let v = controls::get(d, id).unwrap_or(spec.default);
- let out = slider(ui, spec, v, enabled, None);
- apply_slider_out(app, spec, out, |app, v| app.run("develop.set", json!({"control": id, "value": v})));
- }
-
- /// Relative temperature scale for rendered (non-raw) files: −100..100 ↔ Kelvin via mired shift.
- const REL_TEMP: ControlSpec = ControlSpec {
- id: "wb.tempRel",
- label: "Temp",
- section: Section::Color,
- min: -100.0,
- max: 100.0,
- default: 0.0,
- step: 1.0,
- decimals: 0,
- track: Track::Temp,
- };
- const REL_TINT: ControlSpec = ControlSpec {
- id: "wb.tintRel",
- label: "Tint",
- section: Section::Color,
- min: -100.0,
- max: 100.0,
- default: 0.0,
- step: 1.0,
- decimals: 0,
- track: Track::Tint,
- };
-
- fn k_to_rel(k: f64) -> f64 {
- ((1e6 / 6500.0 - 1e6 / k) / 0.8).clamp(-100.0, 100.0)
- }
- fn rel_to_k(r: f64) -> f64 {
- 1e6 / (1e6 / 6500.0 - r * 0.8)
- }
+ mod curve;
+ mod grading;
+ mod histogram;
+ mod mixer;
+ mod sliders;
+
+ use curve::curve_editor;
+ use grading::grading;
+ pub(crate) use grading::wheel_pointer_frame_end;
+ #[cfg(test)]
+ pub(crate) use grading::{WheelGrab, WheelLock, WheelMods, wheel_pick};
-use histogram::{histogram, soft_proofing};
++pub(crate) use histogram::histogram;
++use histogram::soft_proofing;
+ use mixer::{mixer, point_color};
+ use sliders::{REL_TEMP, REL_TINT, hdr_row, k_to_rel, profile_menu, quick_develop, rel_to_k, reset_tip, section};
+ pub use sliders::{apply_slider_out, sub_title};
+ pub(crate) use sliders::{control, reload_preview_only};
pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
let t = Tokens::get(ui.ctx());
diff --cc crates/ui-egui/src/panels/edit/histogram.rs
index 000000000,44d791c4a..cd60d5d00
mode 000000,100644..100644
--- a/crates/ui-egui/src/panels/edit/histogram.rs
+++ b/crates/ui-egui/src/panels/edit/histogram.rs
@@@ -1,0 -1,353 +1,355 @@@
+ #[cfg(test)]
+ use super::sliders::reset_tip;
+ use super::*;
+
+ // ------------------------------------------------------------------------------ histogram
+
+ /// The current photo's existing preview histogram, shared by Histogram and Tone Curve.
+ pub(super) fn preview_histogram(app: &LightcraftApp, id: PhotoId) -> Option<lightcraft_raster::Histogram> {
+ app.renderer
+ .textures
+ .get(&Slot::Main)
+ .filter(|t| t.photo == id)
+ .and_then(|t| t.histogram.clone())
+ .or_else(|| app.renderer.textures.get(&Slot::Thumb(id)).and_then(|t| t.histogram.clone()))
+ }
+
+ /// An HDR edit's histogram stays an HDR histogram: some renders carry only their 8-bit image's
+ /// (a drag's drafts, a cached thumbnail or stand-in), and showing those would swap the panel to
+ /// the SDR layout and back while a slider moves. Every render with HDR bins replaces the one kept for the photo, so
+ /// the histogram still follows the edit live; an SDR edit shows what it gets.
+ fn steady_hdr_histogram(ctx: &egui::Context, id: PhotoId, hdr_edit: bool, hist: Option<Histogram>) -> Option<Histogram> {
+ let key = egui::Id::unique(("hdrHistogram", id));
+ match hist {
+ Some(h) if h.hdr.is_some() => {
+ ctx.data_mut(|d| d.insert_temp(key, h.clone()));
+ Some(h)
+ }
+ h if hdr_edit => ctx.data(|d| d.get_temp::<Histogram>(key)).or(h),
+ h => h,
+ }
+ }
+
-pub(super) 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
++/// ([`crate::panels::right::show`]).
++pub(crate) 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);
+ // a drag of an HDR edit: its drafts have no HDR histogram, so a small render beside them
+ // gives one (at its own pace: the drafts don't wait for it)
+ let interacting = app.session.interaction.is_some();
+ if interacting && hdr_edit {
+ let edge = lightcraft_pipeline::HDR_HISTOGRAM_DRAG_EDGE;
+ if let Some(job) = app.session.render_job(id, edge, edge, false, app.ui.right != RightPanel::Crop)
+ && app.renderer.live_hdr_histogram.as_ref().is_none_or(|l| l.1 != job.key)
+ {
+ app.renderer.request(Slot::HdrHistogram, job, 95);
+ }
+ }
+ let live = app.renderer.live_hdr_histogram.as_ref().filter(|l| interacting && l.0 == id).map(|l| l.2.clone());
+ // else the loupe render of this photo, else its thumbnail (grid view before the loupe has
+ // rendered it)
+ let hist = live.or_else(|| preview_histogram(app, id));
+ let hist = steady_hdr_histogram(ui.ctx(), id, hdr_edit, hist);
+ // an HDR edit's histogram (`pipeline::hdr_histogram`) gets a colour bar and an SDR / HDR label
+ // row under the plot
+ let hdr = hist.as_ref().and_then(|h| h.hdr);
+ let legend = if hdr.is_some() { 26.0 } else { 0.0 };
+ let (r, resp) = ui.allocate_exact_size(vec2(w, 118.0 + legend), Sense::click_and_drag());
+ crate::widgets::announce(&resp, crate::i18n::tr("Histogram"));
+ register(ui, "histogram", r);
+ let p = ui.painter();
+ p.rect_filled(r, 0.0, t.button);
+ let plot = Rect::from_min_max(r.min + vec2(0.0, 6.0), pos2(r.right(), r.bottom() - 26.0 - legend));
+ // Lightroom Classic's tonal zones (Blacks / Shadows / Exposure / Highlights / Whites across the
+ // plot): a drag over one moves its control (the band and the readout show which and how far), a
+ // double-click puts it back to its default, and Shift drags a tenth as far
+ let zone = crate::panels::histogram::interact(app, ui, &resp, plot, id);
+ if let Some(a) = &zone {
+ crate::panels::histogram::paint_zone(p, plot, a, &t);
+ }
+ if let Some(b) = hdr {
+ // white for SDR, then one band per stop above SDR white: white too, or (Visualize HDR
+ // range on) in its colours
+ let x0 = plot.left() + plot.width() * b.from as f32 / 255.0;
+ let bar = |a: f32, z: f32, c: Color32| p.rect_filled(Rect::from_min_max(pos2(a, plot.bottom() + 2.0), pos2(z, plot.bottom() + 7.0)), 0.0, c);
+ let white = Color32::from_rgb(228, 228, 230);
+ bar(plot.left(), x0 - 1.0, white);
+ let stops = b.stops.round().max(1.0) as usize;
+ let bands = lightcraft_pipeline::visualize::HDR_BANDS;
+ let colours = app.ui.hdr_visualize;
+ for k in 0..stops {
+ let c = if colours { bands.get(k).or(bands.last()).copied().unwrap_or([255, 255, 255]) } else { [228, 228, 230] };
+ let (a, z) = (x0 + (plot.right() - x0) * k as f32 / stops as f32, x0 + (plot.right() - x0) * (k + 1) as f32 / stops as f32);
+ bar(a + 1.0, z - 1.0, Color32::from_rgb(c[0], c[1], c[2]));
+ }
+ let y = plot.bottom() + 18.0;
+ p.text(pos2((plot.left() + x0) / 2.0, y), Align2::CENTER_CENTER, crate::i18n::tr("SDR"), t.font(12.5), t.text_label);
+ p.text(pos2((x0 + plot.right()) / 2.0, y), Align2::CENTER_CENTER, crate::i18n::tr("HDR"), t.font(12.5), t.text_label);
+ let info = Rect::from_center_size(pos2(plot.right() - 16.0, y), vec2(14.0, 14.0));
+ paint(p, info, Icon::Info, t.text_label);
+ ui.interact(info, egui::Id::unique("hdrHistogramInfo"), Sense::hover()).on_hover_text(crate::i18n::tr(
+ "Left: the standard (SDR) range up to SDR white. Right: the HDR range, one band per stop above SDR white (the orange line: the HDR headroom). With Visualize HDR range on, the bands take its colours.",
+ ));
+ }
+ let clipping = hist.as_ref().map(|h| h.clipping());
+ if let Some(h) = hist {
+ let smooth = |v: &[u32]| -> Vec<f32> {
+ (0..256)
+ .map(|i| {
+ let (a, b) = (i.max(2) - 2, (i + 3).min(256));
+ v[a..b].iter().map(|x| *x as f32).sum::<f32>() / (b - a) as f32
+ })
+ .collect()
+ };
+ // HDR: SDR on the left half, a solid line at SDR white and dashed ones between the stops
+ if let Some(b) = h.hdr {
+ let x0 = plot.left() + plot.width() * b.from as f32 / 255.0;
+ let stops = b.stops.round().max(1.0) as usize;
+ for k in 1..stops {
+ let x = x0 + (plot.right() - x0) * k as f32 / stops as f32;
+ let mut y = plot.top();
+ while y < plot.bottom() {
+ p.line_segment([pos2(x, y), pos2(x, (y + 5.0).min(plot.bottom()))], Stroke::new(1.0, Color32::from_gray(150)));
+ y += 9.0;
+ }
+ }
+ p.line_segment([pos2(x0, plot.top()), pos2(x0, plot.bottom())], Stroke::new(1.5, Color32::from_gray(160)));
+ // the photo's headroom limit on the fixed scale: marked, the range past it dimmed
+ let limit = app.session.develop_of(id).map_or(b.stops, |d| d.hdr.max_ev as f32);
+ if limit.is_finite() && limit >= 0.0 && limit < b.stops - 0.05 {
+ let x = x0 + (plot.right() - x0) * (limit / b.stops).clamp(0.0, 1.0);
+ p.rect_filled(Rect::from_min_max(pos2(x, plot.top()), plot.max), 0.0, Color32::from_black_alpha(70));
+ p.line_segment([pos2(x, plot.top()), pos2(x, plot.bottom())], Stroke::new(1.0, Color32::from_rgb(230, 150, 60)));
+ }
+ }
+ let chans = [(smooth(&h.r), hex("#df3939")), (smooth(&h.g), hex("#44b072")), (smooth(&h.b), hex("#3b6fe0"))];
+ let peak = chans.iter().flat_map(|(v, _)| v.iter().skip(2).take(252)).fold(1.0f32, |a, b| a.max(*b));
+ let to = |i: usize, v: f32| pos2(plot.left() + plot.width() * i as f32 / 255.0, plot.bottom() - plot.height() * (v / peak).sqrt().min(1.0));
+ // luminance fill
+ let lum = smooth(&h.luma);
+ let mut mesh = Mesh::default();
+ for i in 0..256 {
+ let top = to(i, lum[i]);
+ mesh.vertices.push(Vertex { pos: top, uv: Pos2::ZERO, color: Color32::from_gray(120).gamma_multiply(0.35) });
+ mesh.vertices.push(Vertex { pos: pos2(top.x, plot.bottom()), uv: Pos2::ZERO, color: Color32::from_gray(120).gamma_multiply(0.35) });
+ if i > 0 {
+ let k = (i as u32) * 2;
+ mesh.indices.extend([k - 2, k - 1, k, k - 1, k + 1, k]);
+ }
+ }
+ p.add(mesh);
+ // greyscale images: the three channels coincide — draw one neutral line
+ let spread: f32 = (0..256).map(|i| (chans[0].0[i] - chans[1].0[i]).abs() + (chans[1].0[i] - chans[2].0[i]).abs()).sum();
+ let total: f32 = chans[1].0.iter().sum::<f32>().max(1.0);
+ if spread / total < 0.02 {
+ let pts: Vec<Pos2> = (0..256).map(|i| to(i, chans[1].0[i])).collect();
+ p.add(egui::Shape::line(pts, Stroke::new(1.5, Color32::from_gray(200))));
+ } else {
+ for (v, c) in &chans {
+ let pts: Vec<Pos2> = (0..256).map(|i| to(i, v[i])).collect();
+ p.add(egui::Shape::line(pts, Stroke::new(1.5, *c)));
+ }
+ }
+ }
+ 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 [shadow_rect, highlight_rect] = crate::panels::histogram::clipping_rects(ui, plot);
+ for (name, rect, label, clipped) in [
+ ("shadows", shadow_rect, "Shadow clipping", clipping.map(|(lo, _)| lo > 0.003)),
+ ("highlights", highlight_rect, "Highlight clipping", clipping.map(|(_, hi)| hi > 0.003)),
+ ] {
+ let response = ui.interact(rect, ui.scope_id().with(("histogram-clipping", name)), Sense::click());
+ register(ui, format!("histogram:{name}"), rect);
+ response.widget_info(|| egui::WidgetInfo::selected(egui::Role::Button, ui.is_enabled(), app.ui.show_clipping, crate::i18n::tr(label)));
+ clicked |= response.clicked();
+ let active = app.ui.show_clipping;
+ // Keep the hit target comfortable, with a smaller box and clear space to the plot edges.
+ let box_rect = rect.shrink2(vec2(2.0, 2.0));
+ p.rect_filled(
+ box_rect,
+ 3.0,
+ if active {
+ t.pressed
+ } else if response.hovered() {
+ t.hover
+ } else {
+ Color32::from_gray(60)
+ },
+ );
+ if active {
+ p.rect_stroke(box_rect, 3.0, Stroke::new(1.0, t.text), egui::StrokeKind::Inside);
+ }
+ paint(
+ p,
+ Rect::from_center_size(rect.center(), vec2(16.0, 16.0)),
+ Icon::ChevronDown,
+ if clipped == Some(true) || active { t.text } else { t.text_dim },
+ );
+ let status = match clipped {
+ Some(true) => "Clipping detected in this preview.",
+ Some(false) => "No clipping detected in this preview.",
+ None => "Histogram not yet available.",
+ };
+ response.on_hover_text(format!(
+ "{}\n{}\n{}",
+ crate::i18n::tr(label),
+ crate::i18n::tr(if active {
+ "Click to hide clipping warnings for shadows and highlights."
+ } else {
+ "Click to show clipping warnings for shadows and highlights."
+ }),
+ crate::i18n::tr(status)
+ ));
+ }
+ if clicked {
+ let _ = app.run("view.clipping", json!({}));
+ }
+ // the tonal zone the pointer is on replaces the EXIF strip while it is there
+ if let Some(text) = zone.as_ref().and_then(|a| a.readout()) {
+ register(ui, "histogramReadout", r);
+ p.text(pos2(r.left() + r.width() / 2.0, r.bottom() - 13.0), Align2::CENTER_CENTER, text, t.font(12.5), t.text_label);
+ } else if let Some(ph) = app.session.catalog.photo(id) {
+ let m = &ph.meta;
+ let parts: Vec<String> = [
+ m.iso.map(|i| format!("ISO {i}")),
+ m.focal_mm.map(|f| format!("{f:.0}mm")),
+ m.aperture.map(|a| format!("f/{a:.1}")),
+ if m.shutter.is_empty() { None } else { Some(m.shutter.clone()) },
+ ]
+ .into_iter()
+ .flatten()
+ .collect();
+
+ if !parts.is_empty() {
+ let text = parts.join(" · ");
+ let y = r.bottom() - 13.0;
+ let x = r.left() + r.width() / 2.0;
+ p.text(pos2(x, y), Align2::CENTER_CENTER, text, t.font(12.5), t.text_label);
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------------ soft proofing
+
+ /// The Soft Proofing strip under the histogram: proof profile, gamut warnings, Create Proof Copy.
+ pub(super) fn soft_proofing(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) {
+ use lightcraft_engine::pipeline::OutputSpace;
+ let t = Tokens::get(ui.ctx());
+ egui::Frame::NONE.inner_margin(egui::Margin { left: 24, right: 22, top: 8, bottom: 6 }).show(ui, |ui| {
+ ui.horizontal(|ui| {
+ ui.label(RichText::new(crate::i18n::tr("Soft Proofing")).color(t.text).strong());
+ ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
+ let mut dest = app.ui.proof.dest_warning;
+ let r = ui
+ .toggle_value(&mut dest, RichText::new("■").color(Color32::from_rgb(255, 40, 40)))
+ .on_hover_text(crate::i18n::tr("Show destination gamut warning"));
+ register(ui, "button:proofDestWarning", r.rect);
+ let mut disp = app.ui.proof.display_warning;
+ let r2 = ui
+ .toggle_value(&mut disp, RichText::new("■").color(Color32::from_rgb(40, 90, 255)))
+ .on_hover_text(crate::i18n::tr("Show display gamut warning"));
+ register(ui, "button:proofDisplayWarning", r2.rect);
+ if dest != app.ui.proof.dest_warning || disp != app.ui.proof.display_warning {
+ let _ = app.run("view.softProof", json!({"destWarning": dest, "displayWarning": disp}));
+ }
+ });
+ });
+ ui.horizontal(|ui| {
+ ui.label(RichText::new(crate::i18n::tr("Profile:")).color(t.text_label));
+ let cur = app.ui.proof.space;
+ let device = app.ui.proof_profile.as_ref().map(|(_, n)| n.clone());
+ let shown = device.clone().unwrap_or_else(|| cur.label().to_string());
+ let mut pick = false;
+ let combo = crate::widgets::combo_box("proof-space").width(170.0).selected_text(shown).show_ui(ui, |ui| {
+ for s in OutputSpace::ALL {
+ if ui.selectable_label(device.is_none() && cur == s, s.label()).clicked() {
+ let _ = app.run("view.softProof", json!({"space": s}));
+ }
+ }
+ if let Some(n) = &device {
+ let _ = ui.selectable_label(true, n);
+ }
+ if app.services.pick_display_profile.is_some() && ui.selectable_label(false, crate::i18n::tr("Other…")).clicked() {
+ pick = true;
+ }
+ });
+ crate::widgets::name_combo(&combo.response, crate::i18n::tr("Profile"));
+ if pick
+ && let Some(path) = app.services.pick_display_profile.as_mut().and_then(|pick| pick().into_iter().next())
+ && let Err(e) = app.run("view.softProof", json!({"profile": path}))
+ {
+ app.toast(ui.ctx(), e);
+ }
+ });
+ if app.ui.proof_profile.is_some() {
+ ui.horizontal(|ui| {
+ ui.label(RichText::new(crate::i18n::tr("Intent:")).color(t.text_label));
+ use lightcraft_engine::proof::ProofIntent;
+ for (i, label) in [(ProofIntent::Perceptual, "Perceptual"), (ProofIntent::Relative, "Relative")] {
+ let r = ui.selectable_label(app.ui.proof_intent == i, crate::i18n::tr(label));
+ register(ui, format!("button:proofIntent-{}", i.name()), r.rect);
+ if r.clicked() && app.ui.proof_intent != i {
+ let _ = app.run("view.softProof", json!({"intent": i.name()}));
+ }
+ }
+ });
+ let mut paper = app.ui.proof_paper_ink;
+ let r = ui.checkbox(&mut paper, crate::i18n::tr("Simulate Paper & Ink"));
+ register(ui, "button:proofPaperInk", r.rect);
+ if r.changed() {
+ let _ = app.run("view.softProof", json!({"paperInk": paper}));
+ }
+ }
+ let r = ui.button(crate::i18n::tr("Create Proof Copy"));
+ register(ui, "button:createProofCopy", r.rect);
+ if r.clicked() {
+ let target = app.ui.proof_profile.as_ref().map_or_else(|| app.ui.proof.space.label().to_string(), |(_, n)| n.clone());
+ let name = crate::i18n::tr_format!("Proof Copy ({})", target);
+ if app.run("photo.virtualCopy", json!({"ids": [id.0], "name": name})).is_ok() {
+ app.toast(ui.ctx(), crate::i18n::tr("Proof copy created"));
+ }
+ }
+ });
+ divider(ui);
+ }
+
+ #[cfg(test)]
+ mod tests {
+ use super::*;
+
+ #[test]
+ fn an_hdr_edit_keeps_its_hdr_histogram_through_8_bit_renders() {
+ let ctx = egui::Context::default();
+ let id = PhotoId(7);
+ let sdr = Histogram::of_hdr(&[], 5.0);
+ let sdr = Histogram { hdr: None, ..sdr };
+ let hdr = |v: f32| Histogram::of_hdr(&[[v, v, v]], 5.0);
+ // nothing kept yet: what arrives
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, Some(sdr.clone())), Some(sdr.clone()));
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, Some(hdr(2.0))), Some(hdr(2.0)));
+ // a cached thumbnail's 8-bit histogram (or none) doesn't swap the panel to SDR
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, Some(sdr.clone())), Some(hdr(2.0)));
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, None), Some(hdr(2.0)));
+ // the next HDR render replaces it: the histogram follows the slider
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, Some(hdr(4.0))), Some(hdr(4.0)));
+ assert_eq!(steady_hdr_histogram(&ctx, id, true, Some(sdr.clone())), Some(hdr(4.0)));
+ // HDR turned off: the SDR histogram at once; other photos keep their own
+ assert_eq!(steady_hdr_histogram(&ctx, id, false, Some(sdr.clone())), Some(sdr.clone()));
+ assert_eq!(steady_hdr_histogram(&ctx, PhotoId(8), true, Some(sdr.clone())), Some(sdr));
+ }
+
+ /// Issue #1751: Windows and Linux read Ctrl where macOS reads Cmd, and a rebound shortcut shows.
+ #[test]
+ fn reset_tooltip_names_the_shortcut_of_this_platform() {
+ let keymap = crate::shortcuts::Keymap::new();
+ assert_eq!(reset_tip(&keymap, false), "Reset all edits (Ctrl+Shift+R)");
+ assert_eq!(reset_tip(&keymap, true), "Reset all edits (⌘⇧R)");
+ let rebound: crate::shortcuts::Keymap = [("develop.reset".to_string(), "Cmd+Alt+R".to_string())].into();
+ assert_eq!(reset_tip(&rebound, false), "Reset all edits (Ctrl+Alt+R)");
+ let unbound: crate::shortcuts::Keymap = [("develop.reset".to_string(), String::new())].into();
+ assert_eq!(reset_tip(&unbound, false), "Reset all edits");
+ }
+ }
diff --cc docs/parity-checklist.md
index 05f46287b,90cfc248f..ce1c5124a
--- a/docs/parity-checklist.md
+++ b/docs/parity-checklist.md
@@@ -1,6 -1,6 +1,6 @@@
# Lightroom parity checklist
- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-24 · **Change:** minor (LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; 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; 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.6
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** minor (LR-BEHAV-TITLEBAR: a double-click follows the system setting, and a panel over the bar keeps the window still; KEYC-METADATA, LRC-LIB-KEYWORDS: ⌥0 / ⌥⇧0 go to the next / previous keyword set; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; 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; KEYC-METADATA: ⌘K / Ctrl+K Add Keywords; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; 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-25 · **Change:** minor (LR-VIEW-HISTOGRAM: the histogram stays in view while the Edit panel's sliders scroll, #2679; LR-BEHAV-TITLEBAR: a double-click follows the system setting, and a panel over the bar keeps the window still; KEYC-METADATA, LRC-LIB-KEYWORDS: ⌥0 / ⌥⇧0 go to the next / previous keyword set; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; 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; KEYC-METADATA: ⌘K / Ctrl+K Add Keywords; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; 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
The measured, row-by-row checklist: one row per Lightroom feature, menu item and shortcut, what we
have and what is missing. It answers *does the feature exist?* (feature breadth). Whether it is good
@@@ -139,7 -139,7 +139,7 @@@ differences and missing bindings are i
| 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/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; the plot's five tonal zones also drag to adjust their Basic control (LRC-DEV-HISTOGRAM-DRAG); 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/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; the plot's five tonal zones also drag to adjust their Basic control (LRC-DEV-HISTOGRAM-DRAG); 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/histogram.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; the plot's five tonal zones also drag to adjust their Basic control (LRC-DEV-HISTOGRAM-DRAG); 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)
@@@ -799,9 -799,11 +799,12 @@@ Latin stays upright. Advanced Japanese
| Date | Change | Summary |
|---|---|---|
+ | 2026-10-25 | patch | LR-BEHAV-TITLEBAR: the top bar's title-bar gestures come from craft-window's `title_bar`: a double-click follows the system setting, and a press on a button, the search field or a panel floating over the bar never moves the window; status counts unchanged |
+ | 2026-10-24 | minor | KEYC-METADATA, LRC-LIB-KEYWORDS: ⌥0 / ⌥⇧0 (`keyword.nextSet`, `keyword.previousSet`) go to the next / previous keyword set; status counts unchanged (KEYC-METADATA stays 🟡) |
+ | 2026-10-24 | minor | KEYC-METADATA: ⌘K / Ctrl+K (`panel.addKeywords`, Add Keywords) shows the Keywords panel, opens Keywording and puts the cursor in the Add keyword box; status counts unchanged (KEYC-METADATA stays 🟡) |
| 2026-10-24 | patch | LR-LIB-RATING, LR-LIB-DELETE: a slider drag still open when a rating, flag or label takes the photo out of the view, or when the photo is deleted, ends as its own undo step before the selection moves on, as moving to the next photo does; LR-BEHAV-LOCALIZE lists all 18 languages; status unchanged |
| 2026-10-24 | patch | Integration batch 43: Integrated main 98702b5c, preserving the new fail-closed GPS metadata check for Original export. Watermark geometry/orientation and HDR JPEG size-limit fixes remain in their shared helpers; no feature-count changes. |
+| 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-23 | patch | Export integration: Integrated main 5ca49b3e, retaining Width & Height resizing, export format/bit-depth validation and batch panic cancellation alongside the existing watermark and HDR JPEG size-limit fixes. No feature-count changes. |
| 2026-10-23 | minor | LRC-LIB-CATALOG-SWITCH, LR-PREF-GENERAL: Settings ▸ General ▸ At launch (Open the last library / Ask me) with a launch window listing the recent libraries, Alt/Option at launch asks once, File ▸ Open Recent Library ▸ Remove from List and `app.recentLibraries {remove}` (issue #1290); photos dropped while no library is open wait for the one opened (presets are refused then); status and counts unchanged (✅) |
| 2026-10-23 | minor | LRC-LIB-CATALOG-IMPORT: Import Lightroom Catalog… (and Open Library's offer for a Lightroom catalog) asks whether the catalog merges into the open library or goes into a new library made next to it; Settings ▸ General or "Don't ask again" switches the question off; `file.importLightroom` takes `into` / `name` / `location` (#2672); status unchanged (🟡) |