diff --git a/crates/ui-egui/src/panels/edit.rs b/crates/ui-egui/src/panels/edit.rs index c58c41b4..30372393 100644 --- a/crates/ui-egui/src/panels/edit.rs +++ b/crates/ui-egui/src/panels/edit.rs @@ -106,6 +106,13 @@ pub fn show(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) { if text_button(ui, "bw", crate::i18n::tr("B&W"), bw).clicked() { let _ = app.run("develop.treatment", json!({})); } + // HDR editing, next to B&W as Lightroom has it + if text_button(ui, "hdr", crate::i18n::tr("HDR"), d.hdr.enabled) + .on_hover_text(crate::i18n::tr("Edit in HDR: highlights above SDR white, for HDR exports and displays")) + .clicked() + { + let _ = app.run("develop.hdr", json!({"enabled": !d.hdr.enabled})); + } ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { if text_button(ui, "reset", crate::i18n::tr("Reset"), false).on_hover_text(crate::i18n::tr("Reset all edits (Cmd+Shift+R)")).clicked() { @@ -1098,30 +1105,21 @@ fn point_color(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings) // ------------------------------------------------------------------------------ HDR /// The Light panel's HDR row: the HDR switch and Visualize HDR, then (HDR on) the headroom limit. +/// The Light panel's HDR settings while HDR editing is on (the switch itself is the HDR button +/// next to B&W): Visualize HDR range and the headroom limit. fn hdr_row(app: &mut LightcraftApp, ui: &mut egui::Ui, d: &DevelopSettings) { - egui::Frame::NONE.inner_margin(egui::Margin { left: 24, right: 22, top: 4, bottom: 4 }).show(ui, |ui| { - ui.horizontal(|ui| { - let mut on = d.hdr.enabled; - if ui.checkbox(&mut on, "HDR").on_hover_text("Edit in HDR: highlights above SDR white, for HDR exports and displays").changed() { - let _ = app.run("develop.hdr", json!({"enabled": on})); - } - if d.hdr.enabled { - ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { - let mut v = app.ui.hdr_visualize; - if ui - .checkbox(&mut v, "Visualize HDR") - .on_hover_text("Grey below SDR white; yellow, orange, red, magenta up to 1, 2, 3 and over 3 stops above it") - .changed() - { - app.ui.hdr_visualize = v; - } - }); - } - }); - }); - if d.hdr.enabled { - control(app, ui, d, "hdr.maxEv", true); + if !d.hdr.enabled { + return; } + egui::Frame::NONE.inner_margin(egui::Margin { left: 24, right: 22, top: 4, bottom: 4 }).show(ui, |ui| { + let mut v = app.ui.hdr_visualize; + let r = ui.checkbox(&mut v, "Visualize HDR"); + register(ui.ctx(), "check:hdrVisualize", r.rect); + if r.on_hover_text("Grey below SDR white; yellow, orange, red, magenta up to 1, 2, 3 and over 3 stops above it").changed() { + app.ui.hdr_visualize = v; + } + }); + control(app, ui, d, "hdr.maxEv", true); } // ------------------------------------------------------------------------------ colour grading diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index fed41334..1bb916a4 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -175,7 +175,7 @@ differences and missing bindings are in [ui-parity.md](ui-parity.md#shortcuts). |---|---|---|---|---|---| | LR-EDIT-AUTO | Auto settings | P0 | ✅ | `cmd:develop.auto`, `crates/pipeline/src/auto.rs` | a Lightroom-like recipe calibrated black-box on Lightroom's Auto results for 24 Sony raws: Exposure from the scene's scene-linear log-average luminance (Lightroom's observed slope, -0.41 EV per EV), Highlights -66 and Shadows +52 (Lightroom's average Auto values), Contrast +68 and Vibrance +30 fitted on our scales. Held out one photo at a time: on the 16 photos whose start Sony's DRO doesn't brighten, a median dE76 of 6.4 from Lightroom's Auto results against 8.3 unedited; on all 24, 7.7 against 7.9 (issues #318, #209). Calibrated on Sony files only; Whites and Blacks stay 0 | | LR-EDIT-BW | Black & white | P0 | ✅ | `cmd:develop.treatment` | | -| LR-EDIT-HDR-MODE | HDR editing | P2 | ✅ | `cmd:develop.hdr`, `ctl:hdr.maxEv`, `crates/ui-egui/src/panels/edit.rs` (`hdr_row`) | HDR switch in the Light panel; see Q. HDR | +| LR-EDIT-HDR-MODE | HDR editing | P2 | ✅ | `cmd:develop.hdr`, `ctl:hdr.maxEv`, `crates/ui-egui/src/panels/edit.rs` (`hdr_row`) | HDR button next to B&W in the Edit panel header, as Lightroom (Visualize HDR and the headroom limit in the Light panel while it's on); see Q. HDR | | LR-EDIT-LIGHT-EXPOSURE | Exposure | P0 | ✅ | `ctl:light.exposure` | | | LR-EDIT-LIGHT-CONTRAST | Contrast | P0 | ✅ | `ctl:light.contrast` | | | LR-EDIT-LIGHT-HIGHLIGHTS | Highlights | P0 | ✅ | `ctl:light.highlights`, `crates/raw/src/highlight.rs` | sensor-clipped highlights stay neutral when Highlights (or Exposure, Whites) darkens them: fully clipped content is rebuilt to the neutral of the colour model applied after it, partly clipped content takes its colour from reliable unclipped content nearby (not from dark objects, lens fringes or another surface beside it) and white where there is none, and pale partly clipped content (a white sky) turns white on its way to clipping (#523); binned previews and thumbnails decide clipping per sample before averaging (`develop_binned_masked`, `highlight::reconstruct_masked`), so a block with one clipped specular sample keeps its mean instead of jumping to the clip level, which reconstruction turned into green speckles at 500 px (#548) |