From aec8579000247716d4600804525f9b9a295288f8 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 24 Oct 2026 18:58:35 -0600 Subject: [PATCH 01/41] feat(ui): drag the zones of a Hue/Saturation colour range (#9252) The range bar's handles moved one at a time. As in Photoshop 2025, dragging between them moves them together: the fully-on span moves all four, the left or right fade its own two. A side stops at the other and the range never passes a turn. One history step per drag. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/dialogs/adjust_editors.rs | 25 +++++++- .../dialogs/adjust_editors/hue_saturation.rs | 60 +++++++++++++++++++ .../src/dialogs/adjust_editors/ui_tests.rs | 29 +++++++++ docs/ui-parity.md | 3 +- 4 files changed, 115 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors.rs b/crates/ui-egui/src/dialogs/adjust_editors.rs index c2c503d05c..a7cca0af24 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors.rs @@ -45,7 +45,7 @@ use gradient_map::gradient_map; pub use gradient_map::{gradient_presets, is_gray, swatches}; use hue_saturation::hue_saturation; #[cfg(test)] -use hue_saturation::{lightness_track, move_hue_range_handle, saturation_track}; +use hue_saturation::{hue_range_zone, lightness_track, move_hue_range_handle, move_hue_range_zone, saturation_track}; use levels::levels; pub use levels::{auto_levels, gamma_from_pos, gamma_pos}; pub use session::{layer_editor, layer_mem, properties_coalesce, properties_reset, session_start}; @@ -261,6 +261,29 @@ mod tests { assert_eq!(track_stops(&cx(false), &stops), None); } + /// #9252: Photoshop 2025's zone drags on a colour range (measured on Reds): the fully-on span + /// moves all four handles, each fade its own two; a side stops at the other and the range + /// never passes a turn. + #[test] + fn hue_range_zones_move_their_handles() { + let reds = [-45.0, -15.0, 15.0, 45.0]; + assert_eq!(hue_range_zone(reds, 345.0 - 15.0), Some(0)); + assert_eq!(hue_range_zone(reds, 0.0), Some(1)); + assert_eq!(hue_range_zone(reds, 30.0), Some(2)); + assert_eq!(hue_range_zone(reds, 180.0), None); + let centre = move_hue_range_zone(reds, 1, 37.0); + assert_eq!(centre, [-8.0, 22.0, 52.0, 82.0], "all four, as Photoshop's 315/345…15\\45 → 352/21…52\\81"); + let left = move_hue_range_zone(centre, 0, -19.0); + assert_eq!(left, [-27.0, 3.0, 52.0, 82.0], "the left two only"); + let right = move_hue_range_zone(left, 2, 19.0); + assert_eq!(right, [-27.0, 3.0, 71.0, 101.0], "the right two only"); + assert_eq!(move_hue_range_zone(reds, 0, 100.0), [-15.0, 15.0, 15.0, 45.0], "the left side stops at the right"); + assert_eq!(move_hue_range_zone(reds, 2, -100.0), [-45.0, -15.0, -15.0, 15.0], "and the right at the left"); + let wide = move_hue_range_zone(reds, 2, 500.0); + assert!(wide[3] - wide[0] <= 359.0 + 1e-3, "{wide:?}"); + assert_eq!(move_hue_range_zone(reds, 1, f32::NAN), reds); + } + #[test] fn hue_range_drag_canonicalizes_bounds_before_clamping() { let moved = move_hue_range_handle([0.0, 350.0, 100.0, 200.0], 2, 354.0); diff --git a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs index b1c61947fa..0e90c3ec6e 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs @@ -38,6 +38,46 @@ pub(super) fn move_hue_range_handle(bounds: [f32; 4], k: usize, deg: f32) -> [f3 b } +/// Which zone of a colour range a hue `deg` falls in, between its handles: 0 = the left fade +/// (between the first two), 1 = the fully-on span, 2 = the right fade; `None` outside the range. +pub(super) fn hue_range_zone(bounds: [f32; 4], deg: f32) -> Option { + let b = HueRange::canonical_bounds(bounds); + let rel = (deg - b[0]).rem_euclid(360.0); + let (one, two, three) = (b[1] - b[0], b[2] - b[0], b[3] - b[0]); + if rel <= one { + Some(0) + } else if rel <= two { + Some(1) + } else if rel <= three { + Some(2) + } else { + None + } +} + +/// A drag of `delta` degrees on a zone of a colour range (#9252), as in Photoshop: the left fade +/// moves the two left handles, the fully-on span all four, the right fade the two right handles; +/// a side never crosses the other or grows the range past a turn. +pub(super) fn move_hue_range_zone(start: [f32; 4], zone: u8, delta: f32) -> [f32; 4] { + let b = HueRange::canonical_bounds(start); + if !delta.is_finite() { + return b; + } + let moved = match zone { + 0 => { + let d = delta.min(b[2] - b[1]).max(b[3] - 359.0 - b[0]); + [b[0] + d, b[1] + d, b[2], b[3]] + } + 1 => b.map(|v| v + delta), + 2 => { + let d = delta.max(b[1] - b[2]).min(b[0] + 359.0 - b[3]); + [b[0], b[1], b[2] + d, b[3] + d] + } + _ => b, + }; + HueRange::canonical_bounds(moved) +} + /// The spectrum bar after the adjustment (what each hue becomes), sampled at `n` hues. fn adjusted_spectrum(v: &Value, n: usize) -> Vec { let adj = photocraft_engine::commands::adjustment_from_params("hueSaturation", v); @@ -177,14 +217,34 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> p.rect_filled(Rect::from_center_size(pos2(x, mid), vec2(5.0, 12.0)), 1.0, fill); p.rect_stroke(Rect::from_center_size(pos2(x, mid), vec2(5.0, 12.0)), 1.0, Stroke::new(1.0, t.text_dim), StrokeKind::Inside); } + ui.data_mut(|d| d.insert_temp(cx.mem.with("hs-range-bars"), bars)); let drag_id = cx.mem.with("hs-range-drag"); + let zone_id = cx.mem.with("hs-range-zone"); let mut which: Option = ui.data(|d| d.get_temp(drag_id)).flatten(); + // A press between the handles drags a zone (#9252): its zone, the bounds and x it began at. + let mut zone: Option<(u8, [f32; 4], f32)> = ui.data(|d| d.get_temp(zone_id)).flatten(); if bresp.is_pointer_button_down_on() && ui.input(|i| i.pointer.primary_pressed()) && let Some(pos) = ui.input(|i| i.pointer.press_origin()) { which = nearest(&b.map(xof), pos.x).filter(|k| (xof(b[*k as usize]) - pos.x).abs() < 10.0); + zone = if which.is_none() { hue_range_zone(b, deg_of(pos.x)).map(|z| (z, b, pos.x)) } else { None }; } + if bresp.is_pointer_button_down_on() + && let (Some((z, start, x0)), Some(pos)) = (zone, ui.input(|i| i.pointer.interact_pos())) + { + let before = b; + b = move_hue_range_zone(start, z, (pos.x - x0) / w * 360.0); + if b != before { + v[key]["range"] = json!(b.map(|x| x.round())); + e.changed = true; + } + } + if zone.is_some() && !bresp.is_pointer_button_down_on() { + zone = None; + e.commit = true; + } + ui.data_mut(|d| d.insert_temp(zone_id, zone)); if bresp.is_pointer_button_down_on() && let (Some(k), Some(pos)) = (which, ui.input(|i| i.pointer.interact_pos())) { diff --git a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs index f41fe4eca0..68b9793d5a 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs @@ -995,3 +995,32 @@ fn gradient_map_stop_picker_closed_without_a_colour_changes_nothing() { assert!(h.state().live_adjust.is_none()); } } + +/// #9252: in a Hue/Saturation layer's Properties, dragging the zones between the range handles +/// moves them as Photoshop does: the fully-on span all four, a fade its own two; one history step +/// per drag. +#[test] +fn hue_saturation_range_zones_drag_their_handles() { + let mut h = app_harness("hueSaturation", "rgb", 8); + let (id, _) = layer(&h); + let mem = crate::adjust_editors::layer_mem(id); + h.ctx.data_mut(|d| d.insert_temp(mem.with("hs-range"), 3usize)); // Greens: 75/105…135\165 + h.run_steps(3); + let bars: Rect = h.ctx.data(|d| d.get_temp(mem.with("hs-range-bars"))).expect("the range bars"); + let x = |deg: f32| bars.left() + deg / 360.0 * bars.width(); + let y = bars.center().y; + let greens = |h: &Harness<'_, PhotocraftApp>| match layer(h).1 { + Adjustment::HueSaturation { ranges, .. } => ranges[2].bounds, + other => panic!("{other:?}"), + }; + let steps = h.state().session.active().unwrap().history.past_len(); + drag(&mut h, Pos2::new(x(120.0), y), Pos2::new(x(156.0), y)); + let b = greens(&h); + assert!((b[0] - 111.0).abs() <= 1.0 && (b[3] - 201.0).abs() <= 1.0 && (b[1] - b[0] - 30.0).abs() < 0.5, "all four moved ~36°: {b:?}"); + assert_eq!(h.state().session.active().unwrap().history.past_len(), steps + 1, "one step"); + let before = greens(&h); + drag(&mut h, Pos2::new(x((before[0] + before[1]) / 2.0), y), Pos2::new(x((before[0] + before[1]) / 2.0 - 18.0), y)); + let b = greens(&h); + assert!((b[0] - (before[0] - 18.0)).abs() <= 1.0 && (b[1] - (before[1] - 18.0)).abs() <= 1.0, "left two moved: {before:?} → {b:?}"); + assert_eq!([b[2], b[3]], [before[2], before[3]], "right two stay"); +} diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 7031163bfb..e692a9d1b5 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI parity: tools, handles, modifiers and feel -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (Channels panel menu: New Channel…, Duplicate Channel, Delete Channel, New Spot Channel…, Merge Spot Channel, Channel Options…, Split Channels, Merge Channels…, #11451; a Color Picker for another dialog's colour or the Crop shield shows the picked colour there before OK, #9886; Edit › Transform › Distort side handles move their edge, Perspective side handles skew, #10085; Ctrl + Alt + wheel zooms the canvas like ⌥ + wheel on Windows and Linux, where winit reports a held Ctrl as both ctrl and command, #10488; Layers panel filter by Color, #5898; 11 of 183 preferences do nothing: startup reads Graphics Adapter through the typed Performance section, so the scorecard audit sees it; Shape Fill/Stroke popover as Photoshop's, every colour swatch opens the full Color Picker with a live preview; the text and gradient stop Color Pickers show the picked colour on the canvas before OK, #5530; selected colour sets edit drawing, tone and supported filters; geometry remains open; a paragraph box that can't hold its text enlarges its lower-right handle and shows a black + in it, as the reference application; Free Transform of several selected layers, #6501; Path Operations fixes: the first component keeps combining, a hidden component selection is left alone, a dragged live shape stays live, a refused Pen draft ends once; Pen, Freeform Pen, Curvature Pen and Path Selection Path Operations menu, which changes selected components, `+` / `-` keys, #1397; the Pen carries on an open shape or vector mask path; selection-aware font controls, pending caret fonts and focused commit, plus direct font-name editing with a compact no-match message, #9338; New Group dialog and button modifiers; new layers go into an open active group and join a clipping mask, except that type, shapes, pastes and placed files go above a group whose lock would refuse them; Color panel Hue and Brightness Cube show the out-of-gamut ⚠ and nearest printable colour when the field is at least 53 pt tall, #8672; Art History Brush in the History group of the Y flyout, partial, TOOL-213-20, #1610; Histogram panel: Compact / Expanded / All Channels views, Luminosity and Colors channels, Source, range statistics, Uncached Refresh, live adjustment overlay, Cache Levels preference; the font menu opens on the current family, marked in the recent group when it is a recent one, #9160; Type options bar alignment and direction follow the target paragraph; a swatch click recolours selected type and shape layers with any tool, #9238; UI scale presets done: 105–120% steps, #3222; ⇧⌥ blend mode letters; painting tool Mode menus; ⌥ + an adjustment's shortcut reopens it at its last settings, ⌥⌘L / ⌥⌘M, #8900; Crop default mode: moving the image under the box snaps the frame's edges and centre, #8580; View › Extras hides the Move transform controls, #6699; adjustment clipping stays visible in compact Properties, #5231; Color panel modes from its panel menu, the same in every theme, UI-217-17, #6000; a picked colour recolours the selected type and shapes; Hand tool ⌘ / ⌥ are Zoom In / Zoom Out while held, #6434; the wheel steps value fields, #5473; a dragged guide shows its X or Y beside the pointer, #7680; Type options bar "T" icon scrubs the font size, #6437; Move tool: dragged selected pixels take their own outline as the selection, #7538; artboard backgrounds remain below child Free Transform previews; ⌫/Delete removes the selected smart filter, #4751; Object Finder foreground/background discrimination (#6548); rounded triangle, polygon and star corners; shape Fill/Stroke popovers accept hex RGB values, #6176; a guide let go over either ruler is removed, #6286; Crop rows corrected: saved crop presets and Delete Cropped Pixels off are done, #6562; marching ants in device pixels, #7489; Animated Zoom: holding the Zoom tool zooms continuously, #6210; shape Density and Feather, TOOL-214-12, #5846; Pen Auto Add/Delete on the path being drawn, #6140; Show Transform Controls frames every selected layer; guide keys and clicks; menu bar from the keyboard, #4988; Crop tool Content-Aware Fill; on-canvas corner radius widgets, TOOL-214-12; Curvature Pen edits the active path; Clip Thumbnails to Layer Bounds; Pen ⇧ 45°; last selected tool restored at launch; Layers panel filter-type dropdown with Kind, Name and Mode, #5048; Free Transform box and marching ants follow the selection, #5297; History: the trash deletes the selected snapshot, rows drag onto the trash, #5324; smart filter reordering by drag; smart object perspective row corrected to done, #426; Free Transform H/V skew fields; toolbar tool shortcuts can be reassigned; ⇧-dragged guides land on ruler ticks; layer and selection keys; tool keys; spring-loaded tool letters; type formatting keys; Pen Auto Add/Delete, #4144; smart filter rows; stale missing-tool rows corrected: Color Replacement, Red Eye and the Add/Delete Anchor Point pair are live toolbar tools, Frame landed; no percentage changed; selection-modifier and ⌥-wheel rows match their tests; Properties › Transform shows a shape's path geometry, without its stroke) · **Target:** Adobe Photoshop 2026 +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (Hue/Saturation range zones drag, #9252; Channels panel menu: New Channel…, Duplicate Channel, Delete Channel, New Spot Channel…, Merge Spot Channel, Channel Options…, Split Channels, Merge Channels…, #11451; a Color Picker for another dialog's colour or the Crop shield shows the picked colour there before OK, #9886; Edit › Transform › Distort side handles move their edge, Perspective side handles skew, #10085; Ctrl + Alt + wheel zooms the canvas like ⌥ + wheel on Windows and Linux, where winit reports a held Ctrl as both ctrl and command, #10488; Layers panel filter by Color, #5898; 11 of 183 preferences do nothing: startup reads Graphics Adapter through the typed Performance section, so the scorecard audit sees it; Shape Fill/Stroke popover as Photoshop's, every colour swatch opens the full Color Picker with a live preview; the text and gradient stop Color Pickers show the picked colour on the canvas before OK, #5530; selected colour sets edit drawing, tone and supported filters; geometry remains open; a paragraph box that can't hold its text enlarges its lower-right handle and shows a black + in it, as the reference application; Free Transform of several selected layers, #6501; Path Operations fixes: the first component keeps combining, a hidden component selection is left alone, a dragged live shape stays live, a refused Pen draft ends once; Pen, Freeform Pen, Curvature Pen and Path Selection Path Operations menu, which changes selected components, `+` / `-` keys, #1397; the Pen carries on an open shape or vector mask path; selection-aware font controls, pending caret fonts and focused commit, plus direct font-name editing with a compact no-match message, #9338; New Group dialog and button modifiers; new layers go into an open active group and join a clipping mask, except that type, shapes, pastes and placed files go above a group whose lock would refuse them; Color panel Hue and Brightness Cube show the out-of-gamut ⚠ and nearest printable colour when the field is at least 53 pt tall, #8672; Art History Brush in the History group of the Y flyout, partial, TOOL-213-20, #1610; Histogram panel: Compact / Expanded / All Channels views, Luminosity and Colors channels, Source, range statistics, Uncached Refresh, live adjustment overlay, Cache Levels preference; the font menu opens on the current family, marked in the recent group when it is a recent one, #9160; Type options bar alignment and direction follow the target paragraph; a swatch click recolours selected type and shape layers with any tool, #9238; UI scale presets done: 105–120% steps, #3222; ⇧⌥ blend mode letters; painting tool Mode menus; ⌥ + an adjustment's shortcut reopens it at its last settings, ⌥⌘L / ⌥⌘M, #8900; Crop default mode: moving the image under the box snaps the frame's edges and centre, #8580; View › Extras hides the Move transform controls, #6699; adjustment clipping stays visible in compact Properties, #5231; Color panel modes from its panel menu, the same in every theme, UI-217-17, #6000; a picked colour recolours the selected type and shapes; Hand tool ⌘ / ⌥ are Zoom In / Zoom Out while held, #6434; the wheel steps value fields, #5473; a dragged guide shows its X or Y beside the pointer, #7680; Type options bar "T" icon scrubs the font size, #6437; Move tool: dragged selected pixels take their own outline as the selection, #7538; artboard backgrounds remain below child Free Transform previews; ⌫/Delete removes the selected smart filter, #4751; Object Finder foreground/background discrimination (#6548); rounded triangle, polygon and star corners; shape Fill/Stroke popovers accept hex RGB values, #6176; a guide let go over either ruler is removed, #6286; Crop rows corrected: saved crop presets and Delete Cropped Pixels off are done, #6562; marching ants in device pixels, #7489; Animated Zoom: holding the Zoom tool zooms continuously, #6210; shape Density and Feather, TOOL-214-12, #5846; Pen Auto Add/Delete on the path being drawn, #6140; Show Transform Controls frames every selected layer; guide keys and clicks; menu bar from the keyboard, #4988; Crop tool Content-Aware Fill; on-canvas corner radius widgets, TOOL-214-12; Curvature Pen edits the active path; Clip Thumbnails to Layer Bounds; Pen ⇧ 45°; last selected tool restored at launch; Layers panel filter-type dropdown with Kind, Name and Mode, #5048; Free Transform box and marching ants follow the selection, #5297; History: the trash deletes the selected snapshot, rows drag onto the trash, #5324; smart filter reordering by drag; smart object perspective row corrected to done, #426; Free Transform H/V skew fields; toolbar tool shortcuts can be reassigned; ⇧-dragged guides land on ruler ticks; layer and selection keys; tool keys; spring-loaded tool letters; type formatting keys; Pen Auto Add/Delete, #4144; smart filter rows; stale missing-tool rows corrected: Color Replacement, Red Eye and the Add/Delete Anchor Point pair are live toolbar tools, Frame landed; no percentage changed; selection-modifier and ⌥-wheel rows match their tests; Properties › Transform shows a shape's path geometry, without its stroke) · **Target:** Adobe Photoshop 2026 How PhotoCraft's direct manipulation compares with Photoshop 2026 (27.11.0): the toolbox, the handles and modifier keys of each gesture, nudging, snapping, numeric precision, navigation, @@ -282,6 +282,7 @@ Paragraph; the rest open as in-app floating windows. | 2026-10-24 | minor | Path Selection selects path components and has the Path Operations menu; the menu and `+` / `-` change the selected components' operation (`path.setOperation`); the Pen carries on an open shape layer or vector mask path from its endpoint (#1397 feedback); row stays partial until the Shape tools have the menu; no percentage changed | | 2026-10-25 | minor | Every preference takes effect: 12 of 178 do nothing, the scorecard's count (it still said 46 of 149) | | 2026-10-25 | minor | Art History Brush is in the History group of the Y flyout (partial, TOOL-213-20, #1610) | +| 2026-10-24 | minor | Hue/Saturation: dragging between a colour range's handles moves them as Photoshop 2025 does: the fully-on span moves all four, each fade its own two (#9252). Scores unchanged. | | 2026-10-24 | minor | Color panel: Hue Cube and Brightness Cube show Photoshop's out-of-gamut ⚠ and the nearest printable colour under the chips when the field is at least 53 pt tall, as the slider modes did; a click takes it (#8672). No percentage changed | | 2026-10-24 | minor | Swatches: a click recolours the selected type layers and shape fills whatever the tool, as Photoshop 2025 does (measured with the Move and Brush tools); the Color panel still recolours them only with a Type, shape or Pen tool (#9238). Scores unchanged. | | 2026-10-24 | minor | Type options bar: the alignment and paragraph-direction buttons show the edited or selected type layer's paragraph instead of the tool defaults, as Photoshop's bar does. Scores unchanged. | From f2dcbee218edd0f220e7189e7ccba9933ef54cd6 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 24 Oct 2026 19:27:47 -0600 Subject: [PATCH 02/41] Hue/Saturation range bar: narrow zones stay selectable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeRabbit (discussion_r4369183389): at the narrowest Properties panel the bar is about 230 points, a 30° zone is ~19 points, and every press in it fell within the fixed 10-point handle reach, so no zone could be dragged. A handle's reach toward a neighbour is now a third of the gap (3 to 10 points), leaving the middle third of a narrow zone to the zone; an open side keeps the full 10 points. Test: hue_range_zones_stay_selectable_on_a_narrow_bar. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/dialogs/adjust_editors.rs | 19 ++++++++++++++++++- .../dialogs/adjust_editors/hue_saturation.rs | 17 ++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors.rs b/crates/ui-egui/src/dialogs/adjust_editors.rs index a7cca0af24..78ad692a8c 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors.rs @@ -45,7 +45,7 @@ use gradient_map::gradient_map; pub use gradient_map::{gradient_presets, is_gray, swatches}; use hue_saturation::hue_saturation; #[cfg(test)] -use hue_saturation::{hue_range_zone, lightness_track, move_hue_range_handle, move_hue_range_zone, saturation_track}; +use hue_saturation::{hue_range_handle_at, hue_range_zone, lightness_track, move_hue_range_handle, move_hue_range_zone, saturation_track}; use levels::levels; pub use levels::{auto_levels, gamma_from_pos, gamma_pos}; pub use session::{layer_editor, layer_mem, properties_coalesce, properties_reset, session_start}; @@ -264,6 +264,23 @@ mod tests { /// #9252: Photoshop 2025's zone drags on a colour range (measured on Reds): the fully-on span /// moves all four handles, each fade its own two; a side stops at the other and the range /// never passes a turn. + /// #9272 review: at the narrowest Properties panel (a 230-point bar) a 30° zone is ~19 points + /// wide; a press in its middle grabs the zone, not a handle, while each handle stays grabbable. + #[test] + fn hue_range_zones_stay_selectable_on_a_narrow_bar() { + let w = 230.0; + let xs = [75.0f32, 105.0, 135.0, 165.0].map(|d| d / 360.0 * w); + for (a, z) in [(0, 1), (1, 2), (2, 3)] { + assert_eq!(hue_range_handle_at(xs, (xs[a] + xs[z]) / 2.0), None, "the middle of zone {a}..{z} is the zone's"); + } + for (k, x) in xs.iter().enumerate() { + assert_eq!(hue_range_handle_at(xs, *x + 1.0), Some(k as u8), "handle {k}"); + } + assert_eq!(hue_range_handle_at(xs, xs[0] - 9.0), Some(0), "the full reach outside the range"); + let stacked = [50.0, 50.0, 80.0, 120.0]; + assert!(hue_range_handle_at(stacked, 51.0).is_some(), "coinciding handles stay grabbable"); + } + #[test] fn hue_range_zones_move_their_handles() { let reds = [-45.0, -15.0, 15.0, 45.0]; diff --git a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs index 0e90c3ec6e..27221ebb43 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs @@ -38,6 +38,21 @@ pub(super) fn move_hue_range_handle(bounds: [f32; 4], k: usize, deg: f32) -> [f3 b } +/// The range handle a press at `x` grabs, given the four handles' x positions: the nearest +/// within 10 points, or within a third of the gap to the next handle on that side, so the middle +/// third of a narrow zone still drags the zone (at least 3 points, for handles that coincide). +pub(super) fn hue_range_handle_at(xs: [f32; 4], x: f32) -> Option { + let k = nearest(&xs, x)?; + let d = x - xs[k as usize]; + let gap = xs + .iter() + .enumerate() + .filter(|&(j, &o)| j != k as usize && (o - xs[k as usize]) * d.signum() >= 0.0) + .map(|(_, &o)| (o - xs[k as usize]).abs()) + .fold(f32::INFINITY, f32::min); + (d.abs() < (gap / 3.0).clamp(3.0, 10.0)).then_some(k) +} + /// Which zone of a colour range a hue `deg` falls in, between its handles: 0 = the left fade /// (between the first two), 1 = the fully-on span, 2 = the right fade; `None` outside the range. pub(super) fn hue_range_zone(bounds: [f32; 4], deg: f32) -> Option { @@ -227,7 +242,7 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> && ui.input(|i| i.pointer.primary_pressed()) && let Some(pos) = ui.input(|i| i.pointer.press_origin()) { - which = nearest(&b.map(xof), pos.x).filter(|k| (xof(b[*k as usize]) - pos.x).abs() < 10.0); + which = hue_range_handle_at(b.map(xof), pos.x); zone = if which.is_none() { hue_range_zone(b, deg_of(pos.x)).map(|z| (z, b, pos.x)) } else { None }; } if bresp.is_pointer_button_down_on() From fe19df6077c64cb63416f34989518de5e4e71868 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 24 Oct 2026 19:45:09 -0600 Subject: [PATCH 03/41] Hue/Saturation range bar: handle reach counts neighbours across the seam CodeRabbit (discussion_r4369244320): Reds' fully-on zone crosses the bar's seam, so its two seam handles saw no neighbour on their open side and kept the full 10-point reach, swallowing the whole ~19-point zone on a 230-point bar. The bar is a hue circle: the gap now wraps to the first handle from the other edge. Test: hue_range_zones_stay_selectable_on_a_narrow_bar (a Reds case). Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/dialogs/adjust_editors.rs | 15 +++++++++++---- .../dialogs/adjust_editors/hue_saturation.rs | 17 +++++++++-------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors.rs b/crates/ui-egui/src/dialogs/adjust_editors.rs index 78ad692a8c..998aa2b4f4 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors.rs @@ -271,14 +271,21 @@ mod tests { let w = 230.0; let xs = [75.0f32, 105.0, 135.0, 165.0].map(|d| d / 360.0 * w); for (a, z) in [(0, 1), (1, 2), (2, 3)] { - assert_eq!(hue_range_handle_at(xs, (xs[a] + xs[z]) / 2.0), None, "the middle of zone {a}..{z} is the zone's"); + assert_eq!(hue_range_handle_at(xs, (xs[a] + xs[z]) / 2.0, w), None, "the middle of zone {a}..{z} is the zone's"); } for (k, x) in xs.iter().enumerate() { - assert_eq!(hue_range_handle_at(xs, *x + 1.0), Some(k as u8), "handle {k}"); + assert_eq!(hue_range_handle_at(xs, *x + 1.0, w), Some(k as u8), "handle {k}"); } - assert_eq!(hue_range_handle_at(xs, xs[0] - 9.0), Some(0), "the full reach outside the range"); + assert_eq!(hue_range_handle_at(xs, xs[0] - 9.0, w), Some(0), "the full reach outside the range"); let stacked = [50.0, 50.0, 80.0, 120.0]; - assert!(hue_range_handle_at(stacked, 51.0).is_some(), "coinciding handles stay grabbable"); + assert!(hue_range_handle_at(stacked, 51.0, w).is_some(), "coinciding handles stay grabbable"); + // Reds (315/345…15\45): its fully-on zone crosses the seam, ~9.6 points from each edge. + let reds = [315.0f32, 345.0, 15.0, 45.0].map(|d| d / 360.0 * w); + for x in [w - 1.0, w - 3.0, 0.5, 2.5] { + assert_eq!(hue_range_handle_at(reds, x, w), None, "x {x}: Reds' fully-on zone across the seam"); + } + assert_eq!(hue_range_handle_at(reds, reds[1] + 1.0, w), Some(1)); + assert_eq!(hue_range_handle_at(reds, reds[2] - 1.0, w), Some(2)); } #[test] diff --git a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs index 27221ebb43..777ccf4a39 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs @@ -38,17 +38,18 @@ pub(super) fn move_hue_range_handle(bounds: [f32; 4], k: usize, deg: f32) -> [f3 b } -/// The range handle a press at `x` grabs, given the four handles' x positions: the nearest -/// within 10 points, or within a third of the gap to the next handle on that side, so the middle -/// third of a narrow zone still drags the zone (at least 3 points, for handles that coincide). -pub(super) fn hue_range_handle_at(xs: [f32; 4], x: f32) -> Option { +/// The range handle a press at `x` grabs, given the four handles' x positions on a bar `w` wide: +/// the nearest within 10 points, or within a third of the gap to the next handle on that side, so +/// the middle third of a narrow zone still drags the zone (at least 3 points, for handles that +/// coincide). The bar is a hue circle: the next handle past an edge is the first from the other. +pub(super) fn hue_range_handle_at(xs: [f32; 4], x: f32, w: f32) -> Option { let k = nearest(&xs, x)?; - let d = x - xs[k as usize]; + let (xk, d) = (xs[k as usize], x - xs[k as usize]); let gap = xs .iter() .enumerate() - .filter(|&(j, &o)| j != k as usize && (o - xs[k as usize]) * d.signum() >= 0.0) - .map(|(_, &o)| (o - xs[k as usize]).abs()) + .filter(|&(j, _)| j != k as usize) + .map(|(_, &o)| if d >= 0.0 { (o - xk).rem_euclid(w) } else { (xk - o).rem_euclid(w) }) .fold(f32::INFINITY, f32::min); (d.abs() < (gap / 3.0).clamp(3.0, 10.0)).then_some(k) } @@ -242,7 +243,7 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> && ui.input(|i| i.pointer.primary_pressed()) && let Some(pos) = ui.input(|i| i.pointer.press_origin()) { - which = hue_range_handle_at(b.map(xof), pos.x); + which = hue_range_handle_at(b.map(xof), pos.x, w); zone = if which.is_none() { hue_range_zone(b, deg_of(pos.x)).map(|z| (z, b, pos.x)) } else { None }; } if bresp.is_pointer_button_down_on() From 435d47adad1c2289704fd5faefcdb8b90d10e373 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 25 Oct 2026 09:35:37 -0600 Subject: [PATCH 04/41] Hue/Saturation: a range drag released in its move frame still lands CodeRabbit on #9272: when the pointer moves and lets go between two frames, the release frame isn't 'button down', so the zone drag skipped the final position and committed the bounds from before the move. The release frame now applies its position, for zone and handle drags alike. Test: a_zone_drag_released_in_the_frame_it_moves_still_moves Co-Authored-By: Claude Opus 5.5 --- .../dialogs/adjust_editors/hue_saturation.rs | 11 ++--- .../src/dialogs/adjust_editors/ui_tests.rs | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs index 777ccf4a39..0ec3548798 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs @@ -246,9 +246,10 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> which = hue_range_handle_at(b.map(xof), pos.x, w); zone = if which.is_none() { hue_range_zone(b, deg_of(pos.x)).map(|z| (z, b, pos.x)) } else { None }; } - if bresp.is_pointer_button_down_on() - && let (Some((z, start, x0)), Some(pos)) = (zone, ui.input(|i| i.pointer.interact_pos())) - { + // The release frame applies its position too: a move and a release that land in one frame + // would otherwise commit the bounds from before the move. + let live = bresp.is_pointer_button_down_on() || ui.input(|i| i.pointer.primary_released()); + if live && let (Some((z, start, x0)), Some(pos)) = (zone, ui.input(|i| i.pointer.interact_pos())) { let before = b; b = move_hue_range_zone(start, z, (pos.x - x0) / w * 360.0); if b != before { @@ -261,9 +262,7 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> e.commit = true; } ui.data_mut(|d| d.insert_temp(zone_id, zone)); - if bresp.is_pointer_button_down_on() - && let (Some(k), Some(pos)) = (which, ui.input(|i| i.pointer.interact_pos())) - { + if live && let (Some(k), Some(pos)) = (which, ui.input(|i| i.pointer.interact_pos())) { let k = k as usize; let deg = deg_of(pos.x); let before = b; diff --git a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs index 68b9793d5a..c0d550bcf8 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs @@ -1024,3 +1024,50 @@ fn hue_saturation_range_zones_drag_their_handles() { assert!((b[0] - (before[0] - 18.0)).abs() <= 1.0 && (b[1] - (before[1] - 18.0)).abs() <= 1.0, "left two moved: {before:?} → {b:?}"); assert_eq!([b[2], b[3]], [before[2], before[3]], "right two stay"); } + +/// CodeRabbit on #9272: a move and release that land in the same frame still move the zone; the +/// release frame applies its position before the drag commits. +#[test] +fn a_zone_drag_released_in_the_frame_it_moves_still_moves() { + let mut h = app_harness("hueSaturation", "rgb", 8); + let (id, _) = layer(&h); + let mem = crate::adjust_editors::layer_mem(id); + h.ctx.data_mut(|d| d.insert_temp(mem.with("hs-range"), 3usize)); // Greens: 75/105…135\165 + h.run_steps(3); + let bars: Rect = h.ctx.data(|d| d.get_temp(mem.with("hs-range-bars"))).expect("the range bars"); + let x = |deg: f32| bars.left() + deg / 360.0 * bars.width(); + let y = bars.center().y; + let steps = h.state().session.active().unwrap().history.past_len(); + let (from, to) = (Pos2::new(x(120.0), y), Pos2::new(x(156.0), y)); + h.hover_at(from); + h.run_steps(1); + h.drag_at(from); + h.run_steps(1); + // One frame: the pointer moves and lets go (the harness's queued events take a frame each, + // so both go straight into the next frame's input). + let events = &mut h.input_mut().events; + events.push(egui::Event::PointerMoved(to)); + events.push(egui::Event::PointerButton { pos: to, button: egui::PointerButton::Primary, pressed: false, modifiers: egui::Modifiers::NONE }); + h.run_steps(3); + let b = match layer(&h).1 { + Adjustment::HueSaturation { ranges, .. } => ranges[2].bounds, + other => panic!("{other:?}"), + }; + assert!((b[0] - 111.0).abs() <= 1.0 && (b[3] - 201.0).abs() <= 1.0, "all four moved ~36°: {b:?}"); + assert_eq!(h.state().session.active().unwrap().history.past_len(), steps + 1, "one step"); + // A handle released in the frame it moves lands there too. + let (from, to) = (Pos2::new(x(b[3]), y), Pos2::new(x(b[3] + 20.0), y)); + h.hover_at(from); + h.run_steps(1); + h.drag_at(from); + h.run_steps(1); + let events = &mut h.input_mut().events; + events.push(egui::Event::PointerMoved(to)); + events.push(egui::Event::PointerButton { pos: to, button: egui::PointerButton::Primary, pressed: false, modifiers: egui::Modifiers::NONE }); + h.run_steps(3); + let after = match layer(&h).1 { + Adjustment::HueSaturation { ranges, .. } => ranges[2].bounds, + other => panic!("{other:?}"), + }; + assert!((after[3] - (b[3] + 20.0)).abs() <= 1.0 && after[..3] == b[..3], "the right handle moved 20°: {b:?} → {after:?}"); +} From d2a70d63f18a8eefc6da15dc981c54073a2a4539 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 25 Oct 2026 09:50:37 -0600 Subject: [PATCH 05/41] Hue/Saturation: a range drag ends where the button let go CodeRabbit on #9272: when a release and more pointer movement land in one frame, interact_pos() is the later position, so a zone or handle drag committed bounds past the release. The release frame now reads the primary release event's own position. Test: a_zone_drag_released_in_the_frame_it_moves_still_moves (adds the release-then-move order) Co-Authored-By: Claude Opus 5.5 --- .../dialogs/adjust_editors/hue_saturation.rs | 16 ++++++++++++---- .../src/dialogs/adjust_editors/ui_tests.rs | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs index 0ec3548798..29393a4031 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/hue_saturation.rs @@ -247,9 +247,17 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> zone = if which.is_none() { hue_range_zone(b, deg_of(pos.x)).map(|z| (z, b, pos.x)) } else { None }; } // The release frame applies its position too: a move and a release that land in one frame - // would otherwise commit the bounds from before the move. - let live = bresp.is_pointer_button_down_on() || ui.input(|i| i.pointer.primary_released()); - if live && let (Some((z, start, x0)), Some(pos)) = (zone, ui.input(|i| i.pointer.interact_pos())) { + // would otherwise commit the bounds from before the move. It ends where the button let go, + // not where the pointer went after that in the same frame. + let released_at = ui.input(|i| { + i.events.iter().find_map(|e| match e { + egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed: false, .. } => Some(*pos), + _ => None, + }) + }); + let live = bresp.is_pointer_button_down_on() || released_at.is_some(); + let drag_pos = released_at.or_else(|| ui.input(|i| i.pointer.interact_pos())); + if live && let (Some((z, start, x0)), Some(pos)) = (zone, drag_pos) { let before = b; b = move_hue_range_zone(start, z, (pos.x - x0) / w * 360.0); if b != before { @@ -262,7 +270,7 @@ pub(super) fn hue_saturation(ui: &mut egui::Ui, v: &mut Value, cx: &EditorCx) -> e.commit = true; } ui.data_mut(|d| d.insert_temp(zone_id, zone)); - if live && let (Some(k), Some(pos)) = (which, ui.input(|i| i.pointer.interact_pos())) { + if live && let (Some(k), Some(pos)) = (which, drag_pos) { let k = k as usize; let deg = deg_of(pos.x); let before = b; diff --git a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs index c0d550bcf8..91dc186e4d 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs @@ -1070,4 +1070,21 @@ fn a_zone_drag_released_in_the_frame_it_moves_still_moves() { other => panic!("{other:?}"), }; assert!((after[3] - (b[3] + 20.0)).abs() <= 1.0 && after[..3] == b[..3], "the right handle moved 20°: {b:?} → {after:?}"); + // A release followed by more movement in one frame ends where the button let go. + let b = after; + let (from, to) = (Pos2::new(x((b[1] + b[2]) / 2.0), y), Pos2::new(x((b[1] + b[2]) / 2.0 + 10.0), y)); + h.hover_at(from); + h.run_steps(1); + h.drag_at(from); + h.run_steps(1); + let events = &mut h.input_mut().events; + events.push(egui::Event::PointerMoved(to)); + events.push(egui::Event::PointerButton { pos: to, button: egui::PointerButton::Primary, pressed: false, modifiers: egui::Modifiers::NONE }); + events.push(egui::Event::PointerMoved(Pos2::new(x(b[3] + 60.0), y))); + h.run_steps(3); + let last = match layer(&h).1 { + Adjustment::HueSaturation { ranges, .. } => ranges[2].bounds, + other => panic!("{other:?}"), + }; + assert!(last.iter().zip(&b).all(|(l, b)| (l - (b + 10.0)).abs() <= 1.0), "moved 10° to the release, not past it: {b:?} → {last:?}"); } From 15437c9ea0de29f9fefc09b140b911fcf3f23652 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Fri, 30 Oct 2026 22:28:25 -0600 Subject: [PATCH 06/41] Hue range tests: keep #9252's doc comment on its own test after the rebase Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/dialogs/adjust_editors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/dialogs/adjust_editors.rs b/crates/ui-egui/src/dialogs/adjust_editors.rs index 998aa2b4f4..9b52140fea 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors.rs @@ -261,9 +261,6 @@ mod tests { assert_eq!(track_stops(&cx(false), &stops), None); } - /// #9252: Photoshop 2025's zone drags on a colour range (measured on Reds): the fully-on span - /// moves all four handles, each fade its own two; a side stops at the other and the range - /// never passes a turn. /// #9272 review: at the narrowest Properties panel (a 230-point bar) a 30° zone is ~19 points /// wide; a press in its middle grabs the zone, not a handle, while each handle stays grabbable. #[test] @@ -288,6 +285,9 @@ mod tests { assert_eq!(hue_range_handle_at(reds, reds[2] - 1.0, w), Some(2)); } + /// #9252: Photoshop 2025's zone drags on a colour range (measured on Reds): the fully-on span + /// moves all four handles, each fade its own two; a side stops at the other and the range + /// never passes a turn. #[test] fn hue_range_zones_move_their_handles() { let reds = [-45.0, -15.0, 15.0, 45.0]; From f8ef7d78d03759de8a99ab8a56fca48af760d9d2 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 02:08:43 -0600 Subject: [PATCH 07/41] Hue/Saturation range bar: test a zone drag across the 0/360 seam (FredApps review) Reds' fully-on span sits on both ends of the bar. Drags from its middle at either end move the whole range intact, one history step each, and the handles that pass the seam come out at the other end. Co-Authored-By: Claude Opus 5.5 --- .../src/dialogs/adjust_editors/ui_tests.rs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs index 91dc186e4d..91d866a388 100644 --- a/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs +++ b/crates/ui-egui/src/dialogs/adjust_editors/ui_tests.rs @@ -1088,3 +1088,42 @@ fn a_zone_drag_released_in_the_frame_it_moves_still_moves() { }; assert!(last.iter().zip(&b).all(|(l, b)| (l - (b + 10.0)).abs() <= 1.0), "moved 10° to the release, not past it: {b:?} → {last:?}"); } + +/// FredApps review on #9272: a zone drag across the 0/360 seam. Reds' fully-on span sits on both +/// ends of the bar; a drag from its middle third at either end (nearer a handle grabs the handle) +/// moves the whole range intact, and the handles that pass the seam come out at the other end. +#[test] +fn hue_saturation_range_zone_drags_across_the_seam() { + let mut h = app_harness("hueSaturation", "rgb", 8); + let (id, _) = layer(&h); + let mem = crate::adjust_editors::layer_mem(id); + h.ctx.data_mut(|d| d.insert_temp(mem.with("hs-range"), 1usize)); // Reds: 315/345…15\45 + h.run_steps(3); + let bars: Rect = h.ctx.data(|d| d.get_temp(mem.with("hs-range-bars"))).expect("the range bars"); + let x = |deg: f32| bars.left() + deg / 360.0 * bars.width(); + let y = bars.center().y; + let reds = |h: &Harness<'_, PhotocraftApp>| match layer(h).1 { + Adjustment::HueSaturation { ranges, .. } => ranges[0].bounds, + other => panic!("{other:?}"), + }; + let on_circle = |b: [f32; 4]| b.map(|d| d.rem_euclid(360.0).round()); + let widths = |b: [f32; 4]| [b[1] - b[0], b[2] - b[1], b[3] - b[2]]; + let mut steps = h.state().session.active().unwrap().history.past_len(); + // (press, release, where the four handles land on the circle) + for (from, to, want) in [ + // The span's right end, dragged left: 15\45 cross the seam to the right end. + (358.0, 298.0, [255.0, 285.0, 315.0, 345.0]), + // Back right from its middle: 315\345 cross the seam to the left end. + (300.0, 360.0, [315.0, 345.0, 15.0, 45.0]), + // The span's left end, dragged right: 315/345 cross the seam to the left end. + (2.0, 62.0, [15.0, 45.0, 75.0, 105.0]), + ] { + let before = reds(&h); + drag(&mut h, Pos2::new(x(from), y), Pos2::new(x(to), y)); + let b = reds(&h); + assert!(on_circle(b).iter().zip(&want).all(|(d, w)| (d - w).abs() <= 1.0), "{from}° → {to}°: {before:?} → {b:?}, want {want:?}"); + assert_eq!(widths(b), widths(before), "{from}° → {to}°: the range moves intact"); + steps += 1; + assert_eq!(h.state().session.active().unwrap().history.past_len(), steps, "{from}° → {to}°: one step"); + } +} From 39443ab3aa632ca93ca9bb1b0dc3f6dca269b795 Mon Sep 17 00:00:00 2001 From: DuBearte <130190089+DuBearte@users.noreply.github.com> Date: Sat, 7 Nov 2026 02:04:30 -0500 Subject: [PATCH 08/41] fix(engine): Record Measurements labels a Count tool row "Count N" (#11775) A row recorded from the Count tool was labelled "Measurement N" like a selection row. It is now "Count N", as in the reference application, with the same shared number; selection and ruler rows keep their labels and every other column is unchanged. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd.rs | 2 + crates/engine/src/cmd/analysis_cmds.rs | 4 +- .../src/cmd/count_record_label_tests.rs | 41 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 crates/engine/src/cmd/count_record_label_tests.rs diff --git a/crates/engine/src/cmd.rs b/crates/engine/src/cmd.rs index 4c911e6be0..da7734edcb 100644 --- a/crates/engine/src/cmd.rs +++ b/crates/engine/src/cmd.rs @@ -67,6 +67,8 @@ pub mod color_cmds; pub mod color_to_alpha_cmds; pub mod comps_cmds; pub mod contour_lib_cmds; +#[cfg(test)] +mod count_record_label_tests; pub mod cutout_cmds; pub mod distort_cmds; pub mod document_preset_cmds; diff --git a/crates/engine/src/cmd/analysis_cmds.rs b/crates/engine/src/cmd/analysis_cmds.rs index 0bf2a335ad..f9c62bf0f4 100644 --- a/crates/engine/src/cmd/analysis_cmds.rs +++ b/crates/engine/src/cmd/analysis_cmds.rs @@ -1012,7 +1012,9 @@ fn record(s: &mut Session, p: &Value) -> Result { other => return Err(bad(CMD, format!("unknown source `{other}` (auto|selection|ruler|count)"))), }; // Numbered only once the rows exist, so a failed measurement does not use up a label. - let label = format!("Measurement {}", s.analysis.next_measurement + 1); + // A count's row is "Count N" (#11775); the number is the shared one. + let word = if source == "count" { "Count" } else { "Measurement" }; + let label = format!("{word} {}", s.analysis.next_measurement + 1); let now = p.get("dateTime").and_then(Value::as_str).map(str::to_string).unwrap_or_else(now_iso); let factor = d.measurement.scale.factor(); let mut rows: Vec> = Vec::new(); diff --git a/crates/engine/src/cmd/count_record_label_tests.rs b/crates/engine/src/cmd/count_record_label_tests.rs new file mode 100644 index 0000000000..4ee40729de --- /dev/null +++ b/crates/engine/src/cmd/count_record_label_tests.rs @@ -0,0 +1,41 @@ +//! #11775: Record Measurements labels a Count tool row "Count N"; selection and ruler rows keep +//! their labels, and N is the number the row gets today (the shared counter). + +use serde_json::{Value, json}; + +use crate::Session; + +fn five_counts() -> Session { + let mut s = Session::new(); + s.execute("file.new", json!({"width": 100, "height": 100})).unwrap(); + for i in 0..5 { + s.execute("count.add", json!({"x": 10 + 10 * i, "y": 10})).unwrap(); + } + s +} + +fn record(s: &mut Session, source: &str) -> Value { + let r = s.execute("image.analysis.recordMeasurements", json!({"source": source})).unwrap(); + r["rows"][0]["values"].clone() +} + +#[test] +fn a_count_row_is_labelled_count_n() { + for source in ["count", "auto"] { + let mut s = five_counts(); + let row = record(&mut s, source); + assert_eq!(row["label"], json!("Count 1"), "{source}: {row}"); + assert_eq!(row["count"], json!(5), "{source}: {row}"); + assert_eq!(row["source"], json!("Count Tool"), "{source}: {row}"); + } +} + +#[test] +fn other_rows_keep_their_labels_and_the_counter_is_shared() { + let mut s = five_counts(); + s.execute("select.rect", json!({"x": 0, "y": 0, "width": 20, "height": 20})).unwrap(); + let selection = record(&mut s, "selection"); + assert!(selection["label"].as_str().is_some_and(|l| !l.starts_with("Count")), "{selection}"); + let count = record(&mut s, "count"); + assert_eq!(count["label"], json!("Count 2"), "{count}"); +} From a11204c6773ccf02abfc00b08c4b6e3fdf2381a5 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 21:04:55 +0100 Subject: [PATCH 09/41] Background Eraser: Protect Foreground Color fades with the distance (#11903) Protect Foreground Color skipped every pixel within the whole Tolerance of the foreground colour, the sampled colour included, so with a foreground near the sample nothing was erased at all. It now narrows the Tolerance to the distance between the sampled colour and the foreground colour: the sample is still erased, the protection fades towards the sample, and the foreground colour and colours beyond it are kept, as the reference application does. Co-Authored-By: Claude Opus 5.5 --- crates/paint/src/bg_erase.rs | 32 +++- .../src/bg_erase_protect_foreground_tests.rs | 174 ++++++++++++++++++ 2 files changed, 201 insertions(+), 5 deletions(-) create mode 100644 crates/paint/src/bg_erase_protect_foreground_tests.rs diff --git a/crates/paint/src/bg_erase.rs b/crates/paint/src/bg_erase.rs index 323a90036a..8220eff783 100644 --- a/crates/paint/src/bg_erase.rs +++ b/crates/paint/src/bg_erase.rs @@ -19,7 +19,8 @@ pub struct BgEraseSettings { pub limits: Limits, /// 0..1: largest per-channel difference from the sampled colour that is erased. pub tolerance: f32, - /// Keep pixels that match the foreground colour. + /// Keep the foreground colour: the erase narrows to the colours between the sampled colour and + /// the foreground colour (see [`protected_distance`]). pub protect_foreground: bool, /// Straight RGBA foreground colour (for Protect Foreground Color). pub foreground: [f32; 4], @@ -45,6 +46,22 @@ fn dist(a: &[f32], b: &[f32]) -> f32 { a.iter().zip(b).fold(0.0f32, |m, (x, y)| m.max((x - y).abs())) } +/// The distance `d` from the sampled colour as Protect Foreground Color weighs it: the Tolerance +/// narrows to `limit`, the distance from the sampled colour to the foreground colour, so the +/// protection fades with the distance from the foreground and the sampled colour itself is still +/// erased (#11903). Colours at least as far from the sample as the foreground (the foreground +/// itself included) are never erased; a foreground equal to the sample protects everything. +fn protected_distance(d: f32, tol: f32, limit: f32) -> f32 { + if limit.is_nan() || d.is_nan() || limit <= 0.0 || d >= limit { + return f32::INFINITY; + } + if limit >= tol || d <= 0.0 { + return d; + } + // Stretch the distance so the Tolerance ends at the foreground colour. + d * (tol / limit) +} + /// Erase along `stroke`. The brush opacity is ignored (Photoshop's Background Eraser has none); /// the selection limits the effect. Returns the damaged rectangle; empty when the surface has no /// alpha channel. @@ -116,6 +133,7 @@ pub fn background_eraser_effect(pre: &Surface, bs: &BgEraseSettings) -> Option Some(swatch.clone()), }; let Some(sampled) = sampled else { return }; + let protect_limit = protect_foreground.then(|| dist(&sampled, &fg)); let (w, h) = (r.width() as usize, r.height() as usize); // Per-pixel match weight from the pre-stroke colours: the contiguous fill passes through // pixels this stroke already erased. @@ -129,11 +147,11 @@ pub fn background_eraser_effect(pre: &Surface, bs: &BgEraseSettings) -> Option [f32; 4] { + [200.0 / 255.0, (40.0 + 20.0 * i as f32) / 255.0, 40.0 / 255.0, 1.0] +} + +/// Eight 100 px blocks side by side, 900 x 300 (the reference's layout, shifted up). +fn blocks(fmt: PixelFormat) -> Surface { + let mut s = Surface::new(fmt); + for i in 0..8 { + let x = 100 * i as i32; + s.fill_rect(Rect::new(x, 0, x + 100, 300), &from_rgba(&fmt, block(i))); + } + s +} + +fn stroke(points: &[(f64, f64)]) -> Stroke { + Stroke { + brush: BrushSettings { size: 40.0, hardness: 1.0, spacing: 0.25, pressure_size: false, ..Default::default() }, + points: points.iter().map(|&(x, y)| StrokePoint::new(x, y, 1.0)).collect(), + } +} + +fn settings(protect: Option) -> BgEraseSettings { + BgEraseSettings { + sampling: Sampling::Once, + limits: Limits::Discontiguous, + tolerance: 0.5, + protect_foreground: protect.is_some(), + foreground: block(protect.unwrap_or(0)), + ..Default::default() + } +} + +/// The reference's drag from block 0's centre through all eight; alpha (0-255) at each centre. +fn drag(fmt: PixelFormat, protect: Option) -> [i32; 8] { + let mut s = blocks(fmt); + apply_background_eraser(&mut s, &stroke(&[(50.0, 150.0), (750.0, 150.0)]), &settings(protect), None); + std::array::from_fn(|i| (s.rgba(100 * i as i32 + 50, 150)[3] * 255.0).round() as i32) +} + +/// The measured rows: Sampling Once, Discontiguous, Tolerance 50, 40 px hard tip. Without +/// protection the reference gives `0 30 75 114 156 198 238 255` (the graded erase of #11901). +const REFERENCE: [(usize, [i32; 8]); 3] = + [(1, [0, 255, 255, 255, 255, 255, 255, 255]), (3, [0, 76, 166, 255, 255, 255, 255, 255]), (5, [0, 40, 94, 148, 201, 255, 255, 255])]; + +#[test] +fn the_sampled_colour_is_erased_and_colours_from_the_foreground_on_are_kept() { + for (fg, want) in REFERENCE { + let got = drag(PixelFormat::RGBA8, Some(fg)); + let off = drag(PixelFormat::RGBA8, None); + for i in 0..8 { + match want[i] { + // Fully kept in the reference: kept here too. + 255 => assert_eq!(got[i], 255, "fg block {fg}: block {i} kept, got {got:?}"), + // The sample itself: erased. + 0 => assert_eq!(got[i], 0, "fg block {fg}: block {i} (the sample) erased, got {got:?}"), + // Partly erased in the reference: erased here too, never more than without protection. + _ => assert!(got[i] < 255 && got[i] >= off[i], "fg block {fg}: block {i} partly erased, got {got:?}, off {off:?}"), + } + } + } +} + +#[test] +fn protection_narrows_the_tolerance_to_the_foreground_in_one_dab() { + // One click (Background Swatch = block 0, so the click's own pixel does not matter) on each + // block: with the foreground at block `fg`, the protected click erases what an unprotected + // click at Tolerance = the sample-to-foreground distance erases, and keeps block fg and beyond. + let fmt = PixelFormat::RGBA8; + let click = |protect: Option, tolerance: f32| -> Vec { + (0..8) + .map(|i| { + let mut s = blocks(fmt); + let bs = BgEraseSettings { sampling: Sampling::BackgroundSwatch, background: block(0), tolerance, ..settings(protect) }; + let x = 100.0 * i as f64 + 50.0; + apply_background_eraser(&mut s, &stroke(&[(x, 150.0)]), &bs, None); + s.rgba(x as i32, 150)[3] + }) + .collect() + }; + for fg in [1, 3, 5] { + let protected = click(Some(fg), 0.5); + let narrowed = click(None, 20.0 * fg as f32 / 255.0); + for i in 0..8 { + if i < fg { + assert!((protected[i] - narrowed[i]).abs() <= 1.0 / 255.0, "fg block {fg}: block {i} {protected:?} vs {narrowed:?}"); + } else { + assert_eq!(protected[i], 1.0, "fg block {fg}: block {i} kept, {protected:?}"); + } + } + } +} + +#[test] +fn a_foreground_equal_to_the_sample_erases_nothing() { + for limits in [Limits::Contiguous, Limits::Discontiguous, Limits::FindEdges] { + for tolerance in [0.0, 0.1, 0.5, 1.0] { + let s = blocks(PixelFormat::RGBA8); + let mut t = s.clone(); + let bs = BgEraseSettings { limits, tolerance, ..settings(Some(0)) }; + apply_background_eraser(&mut t, &stroke(&[(50.0, 150.0), (750.0, 150.0)]), &bs, None); + assert_eq!(t, s, "{limits:?} tolerance {tolerance}"); + } + } +} + +#[test] +fn find_edges_keeps_the_foreground_colour_itself() { + // Find Edges erases fully inside the Tolerance; a pixel exactly at the foreground stays. + let fmt = PixelFormat::RGBA8; + let mut s = blocks(fmt); + let bs = BgEraseSettings { limits: Limits::FindEdges, ..settings(Some(1)) }; + apply_background_eraser(&mut s, &stroke(&[(80.0, 150.0), (120.0, 150.0)]), &bs, None); + assert_eq!(s.rgba(75, 150)[3], 0.0, "the sample erased"); + assert_eq!(s.rgba(110, 150)[3], 1.0, "the foreground colour kept"); +} + +#[test] +fn protect_off_is_unchanged() { + // The drag without protection, as main gives it before the graded erase of #11901: today's + // pre-stroke matching over overlapping dabs. Pinned so the protection change cannot leak in. + let off = drag(PixelFormat::RGBA8, None); + assert_eq!(off[0], 0); + assert_eq!(off[7], 255); + let mut s = blocks(PixelFormat::RGBA8); + let mut t = s.clone(); + let on_far = BgEraseSettings { foreground: [0.0, 0.0, 1.0, 1.0], protect_foreground: true, ..settings(None) }; + apply_background_eraser(&mut s, &stroke(&[(50.0, 150.0), (750.0, 150.0)]), &settings(None), None); + apply_background_eraser(&mut t, &stroke(&[(50.0, 150.0), (750.0, 150.0)]), &on_far, None); + assert_eq!(s, t, "a foreground beyond the Tolerance protects nothing"); +} + +#[test] +fn protection_works_in_the_documents_own_channels() { + // 16-bit RGB: the same rows as 8-bit. + let rgb16 = PixelFormat::new(ColorMode::Rgb, SampleType::U16, true); + for (fg, want) in REFERENCE { + let got = drag(rgb16, Some(fg)); + for i in 0..8 { + if want[i] == 255 || want[i] == 0 { + assert_eq!(got[i], want[i], "16-bit fg block {fg}: block {i}, got {got:?}"); + } + } + } + // Gray: blocks stepping by 20 in gray; foreground at block 3 keeps blocks 3 and beyond and + // still erases block 0. + let gray = PixelFormat::new(ColorMode::Grayscale, SampleType::U8, true); + let mut s = Surface::new(gray); + let level = |i: usize| (40.0 + 20.0 * i as f32) / 255.0; + for i in 0..8 { + let x = 100 * i as i32; + s.fill_rect(Rect::new(x, 0, x + 100, 300), &[level(i), 1.0]); + } + let fg = [level(3), level(3), level(3), 1.0]; + let bs = BgEraseSettings { foreground: fg, ..settings(Some(3)) }; + apply_background_eraser(&mut s, &stroke(&[(50.0, 150.0), (750.0, 150.0)]), &bs, None); + let a: Vec = (0..8).map(|i| s.rgba(100 * i + 50, 150)[3]).collect(); + assert_eq!(a[0], 0.0, "gray: the sample erased, {a:?}"); + for (i, v) in a.iter().enumerate().skip(3) { + assert_eq!(*v, 1.0, "gray: block {i} kept, {a:?}"); + } +} From 66fe90cbcb23db5d452f40ada952a9558876a7e2 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 21:37:42 +0100 Subject: [PATCH 10/41] Background Eraser: Angle and Pressure for Size on the options bar (#11908) The Background Eraser bar gets the Angle field (whole degrees, -180 to 180, with the reference application's alert for a typed value outside that) between Tolerance and Protect Foreground Color, and the Pressure for Size toggle after it. Both edit the tool's own brush through tools.setBrush. Co-Authored-By: Claude Opus 5.5 --- .../src/background_eraser_bar_angle_tests.rs | 129 ++++++++++++++++++ crates/ui-egui/src/lib.rs | 2 + crates/ui-egui/src/tools/eraser_ui.rs | 47 ++++++- 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 crates/ui-egui/src/background_eraser_bar_angle_tests.rs diff --git a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs new file mode 100644 index 0000000000..fbaae0eef8 --- /dev/null +++ b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs @@ -0,0 +1,129 @@ +//! #11908: the Background Eraser's options bar has an Angle field between Tolerance and Protect +//! Foreground Color (0° by default, "Set the brush angle", whole degrees from −180 to 180, with the +//! reference application's alert for a typed value outside that) and a Pressure for Size toggle +//! after Protect Foreground Color. Both edit the tool's own brush. + +use egui::vec2; +use egui_kittest::Harness; +use egui_kittest::kittest::{NodeT, Queryable}; +use serde_json::json; + +use crate::PhotocraftApp; +use crate::state::{DialogKind, Tool}; +use crate::theme::ThemeKind; + +const PRESSURE: &str = "Always use pressure for size"; + +fn bar(tool: Tool) -> Harness<'static, PhotocraftApp> { + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 80, "height": 80})).unwrap(); + app.ui.tool = tool; + let mut h = Harness::builder().with_size(vec2(1600.0, 300.0)).build_ui_state(|ui, app| crate::panels::options_bar(app, ui), app); + PhotocraftApp::setup_context(&h.ctx, ThemeKind::ProMedium); + h.run_steps(4); + h +} + +fn angle_field<'a>(h: &'a Harness<'static, PhotocraftApp>) -> Option> { + h.query_all_by_role(egui::accesskit::Role::SpinButton).find(|n| n.accesskit_node().description().as_deref() == Some("Set the brush angle")) +} + +fn shown(h: &Harness<'static, PhotocraftApp>) -> String { + angle_field(h).expect("the Angle field").accesskit_node().value().map(|v| v.to_string()).unwrap_or_default() +} + +fn left(h: &Harness<'static, PhotocraftApp>, label: &str) -> f64 { + h.get_by_label(label).accesskit_node().bounding_box().expect(label).x0 +} + +fn alerts(h: &Harness<'static, PhotocraftApp>) -> Vec { + let dialogs = &h.state().ui.dialogs; + dialogs.iter().filter(|d| d.kind == DialogKind::Error).filter_map(|d| d.fields.get("message")?.as_str().map(str::to_owned)).collect() +} + +fn type_angle(h: &mut Harness<'static, PhotocraftApp>, text: &str) -> f32 { + angle_field(h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + h.event(egui::Event::Text(text.into())); + h.run_steps(1); + h.key_press(egui::Key::Enter); + h.run_steps(2); + h.state().session.tools.brush.angle +} + +#[test] +fn angle_sits_between_tolerance_and_protect_foreground_color() { + let h = bar(Tool::BackgroundEraser); + let field = angle_field(&h).expect("the Angle field"); + let angle = field.accesskit_node().bounding_box().unwrap().x0; + assert!(shown(&h).starts_with('0'), "default 0°: {}", shown(&h)); + assert!(left(&h, "Tolerance:") < angle && angle < left(&h, "Protect Foreground Color"), "Tolerance < Angle < Protect Foreground Color"); + assert_eq!(h.state().session.tools.brush.angle, 0.0); +} + +#[test] +fn typed_angles_are_whole_degrees_clamped_with_the_alert() { + let mut h = bar(Tool::BackgroundEraser); + assert_eq!(type_angle(&mut h, "45.5"), 45.0); + assert_eq!(type_angle(&mut h, "-30"), -30.0); + assert!(alerts(&h).is_empty(), "in range: no alert, {:?}", alerts(&h)); + assert_eq!(type_angle(&mut h, "400"), 180.0); + assert_eq!(alerts(&h), vec!["An integer between -180 ° and 180 ° is required. Closest value inserted.".to_string()]); + assert!(shown(&h).starts_with("180"), "{}", shown(&h)); + h.state_mut().ui.dialogs.clear(); + assert_eq!(type_angle(&mut h, "-200"), -180.0); + assert_eq!(alerts(&h).len(), 1, "one alert for -200"); +} + +#[test] +fn pressure_for_size_follows_protect_foreground_color_off_by_default() { + let mut h = bar(Tool::BackgroundEraser); + assert!(left(&h, "Protect Foreground Color") < left(&h, PRESSURE)); + assert!(!h.state().session.tools.brush.pressure_size, "off by default"); + h.get_by_label(PRESSURE).click(); + h.run_steps(2); + assert!(h.state().session.tools.brush.pressure_size); + h.get_by_label(PRESSURE).click(); + h.run_steps(2); + assert!(!h.state().session.tools.brush.pressure_size); +} + +#[test] +fn angle_and_pressure_are_the_background_erasers_own() { + let mut h = bar(Tool::Brush); + h.state_mut().run("tools.setBrush", json!({"brush": {"angle": -20.0}})).unwrap(); + h.run_steps(2); + h.state_mut().ui.tool = Tool::BackgroundEraser; + h.run_steps(3); + type_angle(&mut h, "30"); + h.get_by_label(PRESSURE).click(); + h.run_steps(2); + h.state_mut().ui.tool = Tool::Brush; + h.run_steps(3); + let brush = &h.state().session.tools.brush; + assert_eq!((brush.angle, brush.pressure_size), (-20.0, false), "the Brush keeps its own angle and pressure"); + h.state_mut().ui.tool = Tool::BackgroundEraser; + h.run_steps(3); + let brush = &h.state().session.tools.brush; + assert_eq!((brush.angle, brush.pressure_size), (30.0, true), "the Background Eraser's values come back"); + assert!(shown(&h).starts_with("30"), "{}", shown(&h)); +} + +#[test] +fn the_field_shows_the_brush_settings_angle() { + let mut h = bar(Tool::BackgroundEraser); + // The Brush Settings panel edits the live brush's angle through `tools.setBrush`. + h.state_mut().run("tools.setBrush", json!({"brush": {"angle": 60.0}})).unwrap(); + h.run_steps(2); + assert!(shown(&h).starts_with("60"), "{}", shown(&h)); + type_angle(&mut h, "-75"); + assert_eq!(h.state().session.tools.brush.angle, -75.0, "what the panel reads"); +} + +#[test] +fn the_magic_eraser_has_neither() { + let h = bar(Tool::MagicEraser); + assert!(angle_field(&h).is_none()); + assert!(h.query_by_label(PRESSURE).is_none()); +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index f19ec41da9..acfce5322d 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -997,6 +997,8 @@ mod pen_path_ownership_tests; #[cfg(test)] mod artboard_options_bar_tests; #[cfg(test)] +mod background_eraser_bar_angle_tests; +#[cfg(test)] mod doc_tab_menu_tests; #[cfg(test)] mod layers_empty_area_menu_tests; diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index ac896eeb0b..2f916f2d18 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -90,6 +90,37 @@ fn opt(ui: &mut egui::Ui, text: &str) { crate::widgets::scrub_option_label(ui, &label); } +/// The reference application's alert for a Background Eraser Angle typed outside −180…180. +pub(crate) const ANGLE_RANGE_MESSAGE: &str = "An integer between -180 ° and 180 ° is required. Closest value inserted."; + +/// The Background Eraser's Angle: an angle icon and a whole-degree field on the brush tip's +/// angle, −180…180, default 0. Returns true when a typed value was out of range and was clamped +/// (400 → 180): the caller shows [`ANGLE_RANGE_MESSAGE`] once the entry is committed. +fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> bool { + let t = Tokens::get(ui.ctx()); + let tip = tl!("Set the brush angle"); + ui.add(icons::image("rotate-cw", 15.0, t.text_dim)).on_hover_text(tip); + // A wider range than the angle's, so a typed 400 reaches us and can be told apart from 180. + let mut a = b.angle; + let r = widgets::value_field_named(ui, tl!("Angle"), &mut a, -ANGLE_TYPED_MAX..=ANGLE_TYPED_MAX, "°", 52.0); + let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); + if r.changed() && a.is_finite() { + let whole = a.trunc(); + let clamped = whole.clamp(-180.0, 180.0); + b.angle = clamped; + // Only typing alerts: a scrub or an arrow-key step past the end just stops there. + let stepped = r.dragged() || ui.input(|i| i.key_pressed(egui::Key::ArrowUp) || i.key_pressed(egui::Key::ArrowDown) || i.smooth_scroll_delta.y != 0.0); + let typed_out = whole != clamped && !stepped; + ui.data_mut(|d| d.insert_temp(out_of_range, typed_out)); + } + let r = r.on_hover_text(tip); + // Enter (or a click away) commits the entry: the alert comes then, not mid-typing. + r.lost_focus() && ui.data_mut(|d| d.remove_temp::(out_of_range)).unwrap_or(false) +} + +/// How far the Angle field lets a typed number through before [`angle_field`] clamps it. +const ANGLE_TYPED_MAX: f32 = 1.0e6; + /// Options bar for the Magic Eraser and Background Eraser. Returns false for other tools. pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bool { let o = &mut app.ui.tool_options; @@ -127,7 +158,21 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bo widgets::dropdown(ui, "bg-eraser-limits", tl!("Limits:"), &mut o.bg_limits, &limits, 110.0); opt(ui, tl!("Tolerance:")); widgets::value_field(ui, &mut o.bg_tolerance, 0.0..=100.0, "%", 62.0); - widgets::checkbox(ui, &mut o.bg_protect_fg, tl!("Protect Foreground Color")); + // Angle and Pressure for Size edit the tool's own brush (the shell swaps one in per + // tool), through `tools.setBrush` like the Brush Settings panel. + let before = app.session.tools.brush.clone(); + let mut brush = before.clone(); + if angle_field(ui, &mut brush) { + let message = tl!(ANGLE_RANGE_MESSAGE).to_string(); + app.ui.open_dialog(crate::state::DialogKind::Error, json!({ "message": message }).as_object().cloned().unwrap_or_default()); + } + widgets::checkbox(ui, &mut app.ui.tool_options.bg_protect_fg, tl!("Protect Foreground Color")); + let name = tl!("Always use pressure for size"); + let pressure = icons::button_with_icon_size_tip(ui, "circle-dot", 24.0, (24.0f32 * 0.52).round(), brush.pressure_size, name, false); + if pressure.on_hover_text(tl!("Always use Pressure for Size. When off, Brush Preset controls pressure")).clicked() { + brush.pressure_size = !brush.pressure_size; + } + crate::brush_panel::commit_gesture(app, ui.ctx(), &before, &brush); } _ => return false, } From 09aa750b1c122119b766c7ea03a9f5adf7ee48ca Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 22:52:19 +0100 Subject: [PATCH 11/41] Background Eraser: erase transparency-locked layers (#11905) Like the reference application, a click or drag on a layer with Lock transparent pixels on erases to transparency and leaves the lock on. Lock image pixels and Lock all still refuse. The live preview mixes dabs back without the lock so it shows what the commit does. Co-Authored-By: Claude Opus 5.5 --- ...ckground_eraser_transparency_lock_tests.rs | 101 ++++++++++++++++++ crates/engine/src/cmd/eraser_cmds.rs | 24 +++-- crates/engine/src/cmd/eraser_cmds/tests.rs | 6 +- crates/engine/src/cmd/retouch_cmds/dab.rs | 7 ++ 4 files changed, 127 insertions(+), 11 deletions(-) create mode 100644 crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs diff --git a/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs new file mode 100644 index 0000000000..ea83a7bd5c --- /dev/null +++ b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs @@ -0,0 +1,101 @@ +//! The Background Eraser on a layer with Lock transparent pixels on (#11905): the reference +//! application erases to transparency exactly as on an unlocked layer, leaves the lock on and shows +//! no alert. Lock image pixels and Lock all still refuse; the Eraser and the Magic Eraser keep their +//! own lock behaviour (they paint the background colour). + +use super::*; + +/// White Background plus a normal layer "Target" with a solid red band across it (y 10..30). +fn session(depth: u32) -> Session { + let mut s = Session::new(); + s.execute("file.new", json!({"width": 64, "height": 40, "depth": depth})).unwrap(); + s.execute("layer.new.layer", json!({"name": "Target"})).unwrap(); + s.execute("select.rect", json!({"x": 0, "y": 10, "width": 64, "height": 20, "antiAlias": false})).unwrap(); + s.execute("edit.fill", json!({"color": "#ff0000"})).unwrap(); + s.execute("select.deselect", json!({})).unwrap(); + s +} + +fn target(s: &Session) -> &Layer { + let d = s.active().unwrap(); + d.doc.layer(d.active_layer.unwrap()).unwrap() +} + +fn alphas(s: &Session) -> Vec { + let surf = target(s).surface().unwrap(); + (0..40).flat_map(|y| (0..64).map(move |x| (x, y))).map(|(x, y)| surf.rgba(x, y)[3]).collect() +} + +fn click() -> Value { + json!({"points": [[32, 20]], "size": 20, "hardness": 1, "tolerance": 50}) +} + +#[test] +fn a_click_on_a_transparency_locked_layer_erases_as_on_an_unlocked_one() { + for depth in [8, 16, 32] { + let mut free = session(depth); + free.execute("paint.backgroundEraser", click()).unwrap(); + let want = alphas(&free); + + let mut s = session(depth); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + let h = s.active().unwrap().history.past_len(); + s.execute("paint.backgroundEraser", click()).unwrap(); + assert_eq!(s.active().unwrap().history.past_len(), h + 1, "{depth}-bit: one History step"); + assert_eq!(target(&s).surface().unwrap().rgba(32, 20)[3], 0.0, "{depth}-bit: erased to transparency"); + assert_eq!(alphas(&s), want, "{depth}-bit: the same alpha as on an unlocked layer"); + assert!(target(&s).locks.transparency, "{depth}-bit: the lock stays on"); + assert_eq!(target(&s).name, "Target", "{depth}-bit: the same layer"); + } +} + +#[test] +fn a_drag_and_the_live_preview_erase_a_transparency_locked_layer_too() { + let mut s = session(8); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + let opts = |pts: &[[f64; 2]]| json!({"points": pts, "size": 12, "hardness": 1}); + let all = [[8.0, 20.0], [32.0, 20.0], [56.0, 20.0]]; + let mut live = live_background_eraser(&s, &opts(&all[..1])).unwrap(); + for q in &all[1..] { + live.push(&[photocraft_paint::StrokePoint::new(q[0], q[1], 1.0)]).unwrap(); + } + let id = s.active().unwrap().active_layer.unwrap(); + let shown = live.doc.layer(id).unwrap().surface().unwrap().clone(); + s.execute("paint.backgroundEraser", opts(&all)).unwrap(); + let surf = target(&s).surface().unwrap(); + for x in [8, 32, 56] { + assert_eq!(surf.rgba(x, 20)[3], 0.0, "({x}, 20) erased"); + assert_eq!(shown.rgba(x, 20)[3], 0.0, "the preview shows ({x}, 20) erased"); + } + assert_eq!(surf.rgba(32, 5)[3], 0.0, "transparent pixels stay transparent"); + assert!(target(&s).locks.transparency); +} + +#[test] +fn locked_pixels_and_lock_all_still_refuse() { + for locks in [json!({"pixels": true}), json!({"all": true})] { + let mut s = session(8); + s.execute("layer.setProps", json!({"locks": locks})).unwrap(); + let before = alphas(&s); + let h = s.active().unwrap().history.past_len(); + let err = s.execute("paint.backgroundEraser", click()).unwrap_err().to_string(); + assert!(err.contains("Could not complete your request because the layer \"Target\" is locked"), "{locks}: {err}"); + assert!(live_background_eraser(&s, &click()).is_err(), "{locks}: the preview refuses too"); + assert_eq!(alphas(&s), before, "{locks}: nothing erased"); + assert_eq!(s.active().unwrap().history.past_len(), h, "{locks}: no History step"); + } +} + +#[test] +fn the_eraser_and_the_magic_eraser_keep_painting_the_background_colour() { + // Magic Eraser: the background colour (white by default), still opaque. + let mut s = session(8); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + s.execute("paint.magicEraser", json!({"x": 32, "y": 20})).unwrap(); + assert_eq!(target(&s).surface().unwrap().rgba(32, 20), [1.0, 1.0, 1.0, 1.0]); + // Eraser: the same. + let mut s = session(8); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + s.execute("paint.stroke", json!({"erase": true, "points": [[8, 20], [56, 20]], "size": 8, "hardness": 1.0})).unwrap(); + assert_eq!(target(&s).surface().unwrap().rgba(32, 20), [1.0, 1.0, 1.0, 1.0]); +} diff --git a/crates/engine/src/cmd/eraser_cmds.rs b/crates/engine/src/cmd/eraser_cmds.rs index 1433498078..cf4782efa9 100644 --- a/crates/engine/src/cmd/eraser_cmds.rs +++ b/crates/engine/src/cmd/eraser_cmds.rs @@ -4,8 +4,9 @@ //! //! Like Photoshop, both turn a Background layer into a normal layer ("Layer 0") first, since the //! Background can't hold transparency. The Magic Eraser paints the background colour on other -//! layers with locked transparency; the Background Eraser refuses them. Both respect the selection, -//! work in the layer's own colour model and depth, and are one undo step per click / stroke. +//! layers with locked transparency; the Background Eraser erases them to transparency and leaves +//! the lock on. Both respect the selection, work in the layer's own colour model and depth, and are +//! one undo step per click / stroke. use photocraft_algo::selection as sel; use photocraft_doc::{Document, Layer, LayerContent, LayerId}; @@ -148,12 +149,11 @@ fn background_eraser_setup(s: &Session, p: &Value) -> Result<(Stroke, BgEraseSet let id = active_pixel_layer(s, p, CMD)?; let d = s.active().ok_or(EngineError::NoDocument)?; let l = d.doc.layer(id).ok_or(EngineError::NoLayer(id))?; + // Lock transparent pixels is no refusal: the reference application erases to transparency + // anyway and leaves the lock on. if let Some(e) = pixels_locked(&d.doc, l) { return Err(e); } - if d.doc.effective_locks(id).transparency && !d.doc.is_background(id) && crate::color_channels::target(s, p)?.is_none() { - return Err(EngineError::Other(format!("Could not use the Background Eraser because the transparency of layer \"{}\" is locked", l.name))); - } Ok((Stroke { brush, points: pts }, bs, id)) } @@ -234,19 +234,24 @@ pub fn live_background_eraser(s: &Session, p: &Value) -> Result Box::new(effect), // No alpha: the commit erases nothing either. None => Box::new(|_: &mut photocraft_paint::retouch::Region, _: &photocraft_paint::retouch::Footprint| {}), })? - .with_tail_preview() + .unlocked(); + live.push(&points)?; + live.with_tail_preview() } /// Eraser-group command specs. @@ -277,3 +282,6 @@ pub fn specs() -> Vec { #[cfg(test)] mod tests; +#[cfg(test)] +#[path = "background_eraser_transparency_lock_tests.rs"] +mod transparency_lock_tests; diff --git a/crates/engine/src/cmd/eraser_cmds/tests.rs b/crates/engine/src/cmd/eraser_cmds/tests.rs index 07866aa72f..fd965b62e8 100644 --- a/crates/engine/src/cmd/eraser_cmds/tests.rs +++ b/crates/engine/src/cmd/eraser_cmds/tests.rs @@ -230,11 +230,11 @@ fn background_eraser_fails_gracefully() { ] { assert!(s.execute("paint.backgroundEraser", p.clone()).is_err(), "{p}"); } - // A normal layer with locked transparency is refused. + // A layer with locked pixels is refused. s.execute("layer.new.layer", json!({})).unwrap(); let id = s.active().unwrap().active_layer.unwrap(); s.edit("lock", |doc, _| { - doc.layer_mut(id).unwrap().locks.transparency = true; + doc.layer_mut(id).unwrap().locks.pixels = true; Ok(()) }) .unwrap(); @@ -319,7 +319,7 @@ fn live_background_eraser_matches_the_commit() { fn live_background_eraser_refuses_what_the_command_refuses() { let mut s = session("rgb", 8); s.execute("layer.new.layer", json!({})).unwrap(); - s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + s.execute("layer.setProps", json!({"locks": {"pixels": true}})).unwrap(); let p = json!({"points": [[20, 20]]}); assert!(live_background_eraser(&s, &p).is_err()); assert!(s.execute("paint.backgroundEraser", p).is_err()); diff --git a/crates/engine/src/cmd/retouch_cmds/dab.rs b/crates/engine/src/cmd/retouch_cmds/dab.rs index e51ac10021..70ba5683ed 100644 --- a/crates/engine/src/cmd/retouch_cmds/dab.rs +++ b/crates/engine/src/cmd/retouch_cmds/dab.rs @@ -537,6 +537,13 @@ impl LiveDab { Ok(self) } + /// Mix the dabs back without the layer's transparency lock, for a tool that erases a locked + /// layer anyway (the Background Eraser). Points shown before this keep the lock. + pub(crate) fn unlocked(mut self) -> Self { + self.lock = false; + self + } + /// Everything the stroke has touched so far. pub fn bounds(&self) -> Rect { self.bounds From 393390c479323a9190f448c330d8a7d006a324d1 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 23:22:07 +0100 Subject: [PATCH 12/41] Background Eraser: a new Angle entry starts without a stale out-of-range flag An entry left uncommitted by a tool switch kept its flag, so focusing the field again and pressing Enter without typing showed the alert. Co-Authored-By: Claude Opus 5.5 --- .../src/background_eraser_bar_angle_tests.rs | 20 +++++++++++++++++++ crates/ui-egui/src/tools/eraser_ui.rs | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs index fbaae0eef8..3311742421 100644 --- a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs +++ b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs @@ -76,6 +76,26 @@ fn typed_angles_are_whole_degrees_clamped_with_the_alert() { assert_eq!(alerts(&h).len(), 1, "one alert for -200"); } +#[test] +fn an_entry_left_by_a_tool_switch_does_not_alert_later() { + let mut h = bar(Tool::BackgroundEraser); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + h.event(egui::Event::Text("400".into())); + h.run_steps(1); + // The tool changes before the entry is committed: the field goes away mid-typing. + h.state_mut().ui.tool = Tool::Brush; + h.run_steps(3); + h.state_mut().ui.tool = Tool::BackgroundEraser; + h.run_steps(3); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press(egui::Key::Enter); + h.run_steps(2); + assert!(alerts(&h).is_empty(), "nothing typed this time: {:?}", alerts(&h)); +} + #[test] fn pressure_for_size_follows_protect_foreground_color_off_by_default() { let mut h = bar(Tool::BackgroundEraser); diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index 2f916f2d18..87172659c0 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -104,6 +104,11 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b let mut a = b.angle; let r = widgets::value_field_named(ui, tl!("Angle"), &mut a, -ANGLE_TYPED_MAX..=ANGLE_TYPED_MAX, "°", 52.0); let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); + // Each edit starts clean: a flag left by an entry the field never committed (the tool was + // switched mid-typing) must not alert on the next one. + if r.gained_focus() { + ui.data_mut(|d| d.remove_temp::(out_of_range)); + } if r.changed() && a.is_finite() { let whole = a.trunc(); let clamped = whole.clamp(-180.0, 180.0); From 58978a5315ede257a28a521ac3eb1ec67a2cc2d5 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 23:37:12 +0100 Subject: [PATCH 13/41] Background Eraser: refusal test in the UI uses Lock image pixels (#11905) Lock transparent pixels no longer refuses the Background Eraser, so the UI test for a refused stroke locks the image pixels instead. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/live_retouch_tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/live_retouch_tests.rs b/crates/ui-egui/src/live_retouch_tests.rs index dff475cde4..ed9f7601f4 100644 --- a/crates/ui-egui/src/live_retouch_tests.rs +++ b/crates/ui-egui/src/live_retouch_tests.rs @@ -119,14 +119,15 @@ fn background_eraser_draws_live_and_commits_what_it_showed() { fn a_refused_background_eraser_stroke_shows_nothing_and_reports_on_release() { let mut app = app(8, Tool::BackgroundEraser); app.run("layer.new.layer", json!({})).unwrap(); - app.run("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + // Lock image pixels refuses (Lock transparent pixels does not, #11905). + app.run("layer.setProps", json!({"locks": {"pixels": true}})).unwrap(); let steps = app.session.active().unwrap().history.past_len(); let m = Modifiers::NONE; tool_event(&mut app, ToolEvent::Down { x: 20.0, y: 20.0, pressure: 1.0 }, m); tool_event(&mut app, ToolEvent::Move { x: 40.0, y: 20.0, pressure: 1.0 }, m); assert!(app.live_stroke.is_none(), "the engine refuses the stroke, so nothing is drawn live"); tool_event(&mut app, ToolEvent::Up { x: 40.0, y: 20.0 }, m); - assert!(app.ui.status_error && app.ui.status.contains("transparency"), "{}", app.ui.status); + assert!(app.ui.status_error && app.ui.status.contains("is locked"), "{}", app.ui.status); assert_eq!(app.session.active().unwrap().history.past_len(), steps); } From 89196404db9480114d8116c4033c80bdd811c996 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sat, 7 Nov 2026 23:56:44 +0100 Subject: [PATCH 14/41] Background Eraser: the Angle field drops its out-of-range flag whenever it is not being typed in Clearing it on gained focus left a gap when focus arrived by keyboard navigation; now any frame the field draws without focus clears it. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/tools/eraser_ui.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index 87172659c0..09d927ac7a 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -104,9 +104,9 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b let mut a = b.angle; let r = widgets::value_field_named(ui, tl!("Angle"), &mut a, -ANGLE_TYPED_MAX..=ANGLE_TYPED_MAX, "°", 52.0); let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); - // Each edit starts clean: a flag left by an entry the field never committed (the tool was - // switched mid-typing) must not alert on the next one. - if r.gained_focus() { + // The flag lives only while an entry is being typed: drawn without the keyboard, the field + // drops it, so an entry the tool switch cut off (never committed) can't alert on a later one. + if !r.has_focus() && !r.lost_focus() { ui.data_mut(|d| d.remove_temp::(out_of_range)); } if r.changed() && a.is_finite() { From 6bd3773e0743d21bb28d76ca7026298462f967ea Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 01:40:59 +0100 Subject: [PATCH 15/41] Address CodeRabbit review: match the foreground at the document's precision, pin the protect-off row The sampled colour is read from stored pixels, but the foreground was compared unrounded, so in 8- and 16-bit documents a foreground between two levels missed its own stored colour: Find Edges erased it, and a foreground stored as the sample no longer protected anything. The foreground is now rounded to the document's sample type first (32-bit float unchanged). protect_off_is_unchanged now pins the whole alpha row, not only the first and last block. Co-Authored-By: Claude Opus 5.5 --- crates/paint/src/bg_erase.rs | 12 +++++- .../src/bg_erase_protect_foreground_tests.rs | 41 +++++++++++++++++-- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/crates/paint/src/bg_erase.rs b/crates/paint/src/bg_erase.rs index 8220eff783..314bf5ab78 100644 --- a/crates/paint/src/bg_erase.rs +++ b/crates/paint/src/bg_erase.rs @@ -4,6 +4,7 @@ //! Colours are compared in the surface's own colour channels (RGB, CMYK, Gray, Lab… at any depth), //! so nothing is converted through RGB; only alpha changes. +use photocraft_color::{SampleType, read_sample, write_sample}; use photocraft_geom::Rect; use photocraft_raster::{Surface, from_rgba}; use serde::{Deserialize, Serialize}; @@ -62,6 +63,15 @@ fn protected_distance(d: f32, tol: f32, limit: f32) -> f32 { d * (tol / limit) } +/// `v` as the document stores it: rounded to the 8- or 16-bit levels, unchanged in 32-bit float. +/// The sampled colour is read from stored pixels, so the foreground is compared at the same +/// precision; otherwise a foreground between two levels misses its own stored colour (#11903). +fn at_sample_precision(sample: SampleType, v: f32) -> f32 { + let mut bytes = [0u8; 4]; + write_sample(&mut bytes, sample, 0, v); + read_sample(&bytes, sample, 0) +} + /// Erase along `stroke`. The brush opacity is ignored (Photoshop's Background Eraser has none); /// the selection limits the effect. Returns the damaged rectangle; empty when the surface has no /// alpha channel. @@ -90,7 +100,7 @@ pub fn background_eraser_effect(pre: &Surface, bs: &BgEraseSettings) -> Option Vec { from_rgba(&fmt, [c[0], c[1], c[2], 1.0])[..nc].to_vec() }; let swatch = native(bs.background); - let fg = native(bs.foreground); + let fg: Vec = native(bs.foreground).into_iter().map(|v| at_sample_precision(fmt.sample, v)).collect(); let (sampling, limits, protect_foreground) = (bs.sampling, bs.limits, bs.protect_foreground); let mut once: Option>> = None; let match_w = move |d: f32| -> f32 { diff --git a/crates/paint/src/bg_erase_protect_foreground_tests.rs b/crates/paint/src/bg_erase_protect_foreground_tests.rs index 42e3a18c5a..c94604072f 100644 --- a/crates/paint/src/bg_erase_protect_foreground_tests.rs +++ b/crates/paint/src/bg_erase_protect_foreground_tests.rs @@ -130,10 +130,9 @@ fn find_edges_keeps_the_foreground_colour_itself() { #[test] fn protect_off_is_unchanged() { // The drag without protection, as main gives it before the graded erase of #11901: today's - // pre-stroke matching over overlapping dabs. Pinned so the protection change cannot leak in. - let off = drag(PixelFormat::RGBA8, None); - assert_eq!(off[0], 0); - assert_eq!(off[7], 255); + // pre-stroke matching over overlapping dabs. The whole row is pinned so the protection change + // cannot leak in (#11901 will change it to the reference's 0 30 75 114 156 198 238 255). + assert_eq!(drag(PixelFormat::RGBA8, None), [0, 0, 0, 0, 0, 0, 92, 255]); let mut s = blocks(PixelFormat::RGBA8); let mut t = s.clone(); let on_far = BgEraseSettings { foreground: [0.0, 0.0, 1.0, 1.0], protect_foreground: true, ..settings(None) }; @@ -172,3 +171,37 @@ fn protection_works_in_the_documents_own_channels() { assert_eq!(*v, 1.0, "gray: block {i} kept, {a:?}"); } } + +#[test] +fn the_foreground_is_matched_at_the_documents_precision() { + // Mid grey 0.5 lies between two 8-bit (and 16-bit) levels and is stored one level up, nearer + // white. The stored foreground colour must still count as the foreground, and a foreground + // that is stored as the sampled colour must still protect everything. + let grey = [0.5, 0.5, 0.5, 1.0]; + for mode in [ColorMode::Rgb, ColorMode::Grayscale] { + for sample in [SampleType::U8, SampleType::U16, SampleType::F32] { + let fmt = PixelFormat::new(mode, sample, true); + let bs = BgEraseSettings { + sampling: Sampling::Once, + limits: Limits::FindEdges, + tolerance: 1.0, + protect_foreground: true, + foreground: grey, + ..Default::default() + }; + // White (the sample) next to the foreground grey. + let mut s = Surface::new(fmt); + s.fill_rect(Rect::new(0, 0, 100, 100), &from_rgba(&fmt, [1.0; 4])); + s.fill_rect(Rect::new(100, 0, 200, 100), &from_rgba(&fmt, grey)); + apply_background_eraser(&mut s, &stroke(&[(50.0, 50.0), (150.0, 50.0)]), &bs, None); + assert_eq!(s.rgba(50, 50)[3], 0.0, "{fmt:?}: the sample erased"); + assert_eq!(s.rgba(150, 50)[3], 1.0, "{fmt:?}: the stored foreground colour kept"); + // The foreground grey is also the sample. + let mut s = Surface::new(fmt); + s.fill_rect(Rect::new(0, 0, 200, 100), &from_rgba(&fmt, grey)); + let t = s.clone(); + apply_background_eraser(&mut s, &stroke(&[(50.0, 50.0), (150.0, 50.0)]), &bs, None); + assert_eq!(s, t, "{fmt:?}: a foreground stored as the sample erases nothing"); + } + } +} From 4cd60bc06b04b659169d2971f48ec716c0ad474c Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 31 Oct 2026 14:50:52 -0600 Subject: [PATCH 16/41] =?UTF-8?q?Layer=20=E2=80=BA=20Copy=20CSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Photoshop's Layer › Copy CSS puts CSS for the selected layers on the clipboard. The new engine command layer.copyCSS writes each layer as a class named after it (characters CSS doesn't allow become _): a type layer's font size, family, colour, line height and alignment, a solid fill or shape's background colour, or an image named after the layer; then its opacity under 100 %, its absolute position and size (none for type) and its z-index from the bottom, in Photoshop's format and order. The Layer menu item copies the result to the clipboard. Fixes #9372 Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd.rs | 2 + crates/engine/src/cmd/layer_css_cmds.rs | 163 ++++++++++++++++++ crates/engine/src/cmd/layer_css_cmds/tests.rs | 94 ++++++++++ crates/engine/src/lib.rs | 1 + crates/ui-egui/src/menu_catalog.rs | 1 + crates/ui-egui/src/menus/invoke.rs | 8 + crates/ui-egui/src/menus/parity.rs | 2 +- crates/ui-egui/src/menus/tests.rs | 25 +++ 8 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 crates/engine/src/cmd/layer_css_cmds.rs create mode 100644 crates/engine/src/cmd/layer_css_cmds/tests.rs diff --git a/crates/engine/src/cmd.rs b/crates/engine/src/cmd.rs index c4addf4c22..88f1c6ebf4 100644 --- a/crates/engine/src/cmd.rs +++ b/crates/engine/src/cmd.rs @@ -98,6 +98,7 @@ pub mod history_select_cmds; pub mod history_source_cmds; pub mod image_cmds; pub mod layer_copy_cmds; +pub mod layer_css_cmds; pub mod layer_label_cmds; pub mod layer_list_cmds; pub mod layer_mask_props_cmds; @@ -1389,6 +1390,7 @@ fn build() -> Vec { v.extend(crate::adjust_cmds::specs()); v.extend(crate::layer_menu_cmds::specs()); v.extend(crate::layer_label_cmds::specs()); + v.extend(crate::layer_css_cmds::specs()); v.extend(crate::layer_xmp_cmds::specs()); v.extend(crate::mode_cmds::specs()); v.extend(crate::multichannel_cmds::specs()); diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs new file mode 100644 index 0000000000..47d33f1b70 --- /dev/null +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -0,0 +1,163 @@ +//! Layer › Copy CSS (#9372): CSS for the selected layers, written as Photoshop writes it. The +//! command returns the text; the shell puts it on the clipboard. +//! +//! Each layer is a class named after it (characters CSS doesn't allow in a name become `_`): +//! a type layer gives its font, colour, line height and alignment, a solid shape or fill layer +//! its colour, any other layer an image named after it; then the opacity when it isn't 100 %, +//! the absolute position (and size, except for type), and its place in the stack as `z-index`, +//! counted from the bottom layer as 1. + +use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, text::TextAlign}; +use serde_json::{Value, json}; + +use crate::commands::CommandSpec; +use crate::{EngineError, Result, Session}; + +pub const ID: &str = "layer.copyCSS"; + +fn bad(message: impl Into) -> EngineError { + EngineError::BadParams { cmd: ID.into(), msg: message.into() } +} + +fn enabled(s: &Session) -> std::result::Result<(), String> { + let st = s.active().ok_or("no document open")?; + if st.selected_layers().is_empty() { Err("no layer selected".into()) } else { Ok(()) } +} + +/// A number as Photoshop writes it in CSS: at most three decimals, no trailing zeros. +pub fn number(v: f64) -> String { + let v = if v.is_finite() { (v * 1000.0).round() / 1000.0 } else { 0.0 }; + let s = format!("{v:.3}"); + let s = s.trim_end_matches('0').trim_end_matches('.'); + if s == "-0" { "0".into() } else { s.to_string() } +} + +/// The class name for a layer: its name with every character CSS doesn't allow in a name as `_`. +pub fn class_name(name: &str) -> String { + let s: String = name.chars().map(|c| if c.is_alphanumeric() || c == '-' || c == '_' { c } else { '_' }).collect(); + if s.is_empty() { "layer".into() } else { s } +} + +fn rgb(c: &photocraft_color::Color) -> String { + let [r, g, b] = c.to_rgb().map(|v| (v.clamp(0.0, 1.0) * 255.0).round() as u8); + format!("rgb({r}, {g}, {b})") +} + +/// The rule for one layer, `z` its place in the stack from the bottom (1-based); `None` for a +/// layer CSS can't describe (groups, adjustments) or one with nothing to place. +pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { + let px_per_pt = f64::from(doc.resolution_dpi.max(1.0)) / 72.0; + let mut props: Vec<(&str, String)> = Vec::new(); + let mut sized = true; + let mut bounds = photocraft_doc::comps::position_bounds(l); + match &l.content { + LayerContent::Group(_) | LayerContent::Adjustment(_) => return None, + LayerContent::Text(t) => { + let style = t.runs.first().map(|r| &r.style); + let size_pt = style.map_or(t.size_pt, |s| s.size_pt); + let family = style.map(|s| s.font_family.as_str()).filter(|f| !f.is_empty()).unwrap_or(&t.font_family); + let color = style.map_or(t.color, |s| s.color); + let paragraph = t.paragraphs.first().map(|p| p.style.clone()).unwrap_or_default(); + // Auto leading is the paragraph's multiple of the size (1.2 by default). + let line_height = match style.and_then(|s| s.leading_pt) { + Some(leading) if size_pt > 0.0 => f64::from(leading / size_pt), + _ => f64::from(paragraph.auto_leading), + }; + let align = match paragraph.align { + TextAlign::Left => "left", + TextAlign::Center => "center", + TextAlign::Right => "right", + _ => "justify", + }; + props.push(("font-size", format!("{}px", number(f64::from(size_pt) * px_per_pt)))); + props.push(("font-family", format!("\"{}\"", family.replace('"', "'")))); + props.push(("color", rgb(&color))); + props.push(("line-height", number(line_height))); + props.push(("text-align", align.into())); + // Point text has no box of its own: only its position. + sized = false; + } + LayerContent::Shape(sh) => match &sh.fill { + Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), + _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + }, + LayerContent::Fill(f) => { + // A fill layer without a shape covers the canvas. + if bounds.is_empty() { + bounds = doc.bounds(); + } + match f { + Fill::Solid(c) => props.push(("background-color", rgb(c))), + _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + } + } + _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + } + if bounds.is_empty() { + return None; + } + if l.opacity < 1.0 { + props.push(("opacity", number(f64::from(l.opacity.max(0.0))))); + } + props.push(("position", "absolute".into())); + props.push(("left", format!("{}px", number(f64::from(bounds.x0))))); + props.push(("top", format!("{}px", number(f64::from(bounds.y0))))); + if sized { + props.push(("width", format!("{}px", number(f64::from(bounds.width()))))); + props.push(("height", format!("{}px", number(f64::from(bounds.height()))))); + } + props.push(("z-index", z.to_string())); + let mut out = format!(".{} {{\n", class_name(&l.name)); + for (k, v) in props { + out.push_str(&format!(" {k}: {v};\n")); + } + out.push_str("}\n"); + Some(out) +} + +fn copy_css(s: &mut Session, p: &Value) -> Result { + let p = p.as_object().ok_or_else(|| bad("expected an object"))?; + let st = s.active().ok_or(EngineError::NoDocument)?; + let ids = match p.get("layer") { + None | Some(Value::Null) => st.selected_layers(), + Some(v) => vec![LayerId(v.as_u64().ok_or_else(|| bad("`layer` must be an unsigned integer"))?)], + }; + if ids.is_empty() { + return Err(bad("no layer selected")); + } + let walk = st.doc.walk(); + for id in &ids { + if !walk.iter().any(|(_, _, l)| l.id == *id) { + return Err(EngineError::NoLayer(*id)); + } + } + // In Layers panel order, top first. + let rules: Vec<(u64, String)> = walk + .iter() + .enumerate() + .rev() + .filter(|(_, (_, _, l))| ids.contains(&l.id)) + .filter_map(|(i, (_, _, l))| rule(&st.doc, i + 1, l).map(|r| (l.id.0, r))) + .collect(); + if rules.is_empty() { + return Err(EngineError::Other("Copy CSS needs a pixel, type, shape or fill layer with content".into())); + } + let css = rules.iter().map(|(_, r)| r.as_str()).collect::>().join("\n"); + Ok(json!({"css": css, "layers": rules.iter().map(|(id, _)| id).collect::>()})) +} + +pub fn specs() -> Vec { + vec![CommandSpec { + id: ID, + label: "Copy CSS", + menu: &["Layer"], + shortcut: None, + params: r#"{"layer":id?} (no layer: the selected layers) → {"css": text, "layers": [id…]}; the app puts the text on the clipboard"#, + enabled, + run: copy_css, + journal: false, + }] +} + +#[cfg(test)] +mod tests; diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs new file mode 100644 index 0000000000..6fa2a39e4b --- /dev/null +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -0,0 +1,94 @@ +use super::*; +use photocraft_doc::Layer; +use photocraft_geom::Rect; + +/// A 400 × 300 document at 72 ppi with a 200 × 140 pixel layer at (100, 80) named `name`. +fn session(name: &str) -> Session { + let mut s = Session::new(); + s.execute("file.new", json!({"width": 400, "height": 300})).unwrap(); + s.execute("layer.new.layer", json!({"name": name})).unwrap(); + s.edit("paint", |doc, active| { + doc.layer_mut(active.unwrap()).unwrap().surface_mut().unwrap().fill_rect(Rect::new(100, 80, 300, 220), &[0.16, 0.35, 0.78, 1.0]); + Ok(()) + }) + .unwrap(); + s +} + +/// Photoshop 2025 copies this for a 200 × 140 pixel layer at (100, 80), second from the bottom. +#[test] +fn a_pixel_layer_copies_as_photoshop_writes_it() { + let mut s = session("Box"); + let r = s.execute(ID, json!({})).unwrap(); + assert_eq!( + r["css"], + json!( + ".Box {\n background-image: url(\"Box.png\");\n position: absolute;\n left: 100px;\n top: 80px;\n width: 200px;\n height: 140px;\n z-index: 2;\n}\n" + ) + ); + // Photoshop: a name with spaces keeps them in the image name and turns them to `_` in the + // class; an opacity under 100 % follows the background. + let mut s = session("My Box 2"); + s.edit("opacity", |doc, active| { + doc.layer_mut(active.unwrap()).unwrap().opacity = 128.0 / 255.0; + Ok(()) + }) + .unwrap(); + let css = s.execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.starts_with(".My_Box_2 {\n background-image: url(\"My Box 2.png\");\n opacity: 0.502;\n position: absolute;\n"), "{css}"); +} + +#[test] +fn fill_and_type_layers_describe_their_colour_and_font() { + let doc = session("Box").active().unwrap().doc.clone(); + // Photoshop: a solid colour gives `background-color` (a fill layer without a shape covers the + // canvas). + let fill = Layer::new("Card", LayerContent::Fill(Fill::Solid(photocraft_color::Color::rgb(1.0, 120.0 / 255.0, 30.0 / 255.0)))); + assert_eq!( + rule(&doc, 4, &fill).unwrap(), + ".Card {\n background-color: rgb(255, 120, 30);\n position: absolute;\n left: 0px;\n top: 0px;\n width: 400px;\n height: 300px;\n z-index: 4;\n}\n" + ); + // A type layer: size, family, colour, auto leading and alignment, then only its position + // (Photoshop writes no size for point text). Its position is where its pixels are. + let mut cache = photocraft_raster::Surface::new(photocraft_color::PixelFormat::RGBA8); + cache.fill_rect(Rect::new(49, 28, 120, 52), &[0.0, 0.0, 0.0, 1.0]); + let text = photocraft_doc::TextLayer { + font_family: "Inter".into(), + size_pt: 24.0, + color: photocraft_color::Color::rgb(0.0, 0.0, 0.0), + cache: Some(cache), + ..Default::default() + }; + let title = Layer::new("Title", LayerContent::Text(text)); + let css = rule(&doc, 3, &title).unwrap_or_default(); + assert_eq!( + css, + ".Title {\n font-size: 24px;\n font-family: \"Inter\";\n color: rgb(0, 0, 0);\n line-height: 1.2;\n text-align: left;\n position: absolute;\n left: 49px;\n top: 28px;\n z-index: 3;\n}\n" + ); + // Groups and adjustments have no CSS. + let group = Layer::group("Group 1", Vec::new()); + assert!(rule(&doc, 5, &group).is_none()); +} + +#[test] +fn numbers_and_names_are_written_as_photoshop_does() { + assert_eq!(number(48.9374), "48.937"); + assert_eq!(number(27.6), "27.6"); + assert_eq!(number(100.0), "100"); + assert_eq!(number(-0.0001), "0"); + assert_eq!(number(f64::NAN), "0"); + assert_eq!(class_name("My Box 2"), "My_Box_2"); + assert_eq!(class_name(""), "layer"); +} + +#[test] +fn bad_params_and_layers_without_css_are_errors() { + let mut s = session("Box"); + assert!(s.execute(ID, json!({"layer": "x"})).is_err()); + assert!(s.execute(ID, json!({"layer": 999_999})).is_err()); + assert!(s.execute(ID, json!([])).is_err()); + s.execute("layer.new.group", json!({})).unwrap(); + assert!(s.execute(ID, json!({})).is_err(), "a group alone has no CSS"); + let mut empty = Session::new(); + assert!(empty.execute(ID, json!({})).is_err(), "no document"); +} diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 8f28147217..b2aa762421 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -110,6 +110,7 @@ pub use cmd::history_select_cmds; pub use cmd::history_source_cmds; pub use cmd::image_cmds; pub use cmd::layer_copy_cmds; +pub use cmd::layer_css_cmds; pub use cmd::layer_label_cmds; pub use cmd::layer_list_cmds; pub use cmd::layer_mask_props_cmds; diff --git a/crates/ui-egui/src/menu_catalog.rs b/crates/ui-egui/src/menu_catalog.rs index 3838a70bcf..d152efd616 100644 --- a/crates/ui-egui/src/menu_catalog.rs +++ b/crates/ui-egui/src/menu_catalog.rs @@ -258,6 +258,7 @@ pub static CATALOG: &[(&[&str], &str, Option<&str>, &str)] = &[ (&["Layer", "New"], "---", None, "---"), (&["Layer", "New"], "Layer via Copy", Some("Cmd+J"), "layer.new.layerViaCopy"), (&["Layer", "New"], "Layer via Cut", Some("Cmd+Shift+J"), "layer.new.layerViaCut"), + (&["Layer"], "Copy CSS", None, "layer.copyCSS"), (&["Layer"], "Duplicate Layer…", None, "layer.duplicate"), (&["Layer", "Delete"], "Layer", None, "layer.delete"), (&["Layer", "Delete"], "Hidden Layers", None, "layer.delete.hiddenLayers"), diff --git a/crates/ui-egui/src/menus/invoke.rs b/crates/ui-egui/src/menus/invoke.rs index 9e2da7e511..cbe858eba6 100644 --- a/crates/ui-egui/src/menus/invoke.rs +++ b/crates/ui-egui/src/menus/invoke.rs @@ -86,6 +86,14 @@ fn invoke_early_commands(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, if id == "help.checkForUpdates" { return Some(crate::updates_ui::check(app, ctx, params.clone())); } + // Layer › Copy CSS: the engine writes the CSS, the clipboard is the shell's (#9372). + if id == photocraft_engine::layer_css_cmds::ID { + return Some(app.run(id, params.clone()).inspect(|r| { + if let Some(css) = r.get("css").and_then(Value::as_str) { + ctx.copy_text(css.to_string()); + } + })); + } if id == "ui.symmetryTransform" { return Some(crate::symmetry_ui::begin(app).map(|_| Value::Null)); } diff --git a/crates/ui-egui/src/menus/parity.rs b/crates/ui-egui/src/menus/parity.rs index 36a4d7bd28..71d5a16046 100644 --- a/crates/ui-egui/src/menus/parity.rs +++ b/crates/ui-egui/src/menus/parity.rs @@ -7,7 +7,7 @@ use crate::menu_catalog::CATALOG; use crate::menus::is_live; /// Minimum number of live catalog items. Raise it when parity grows; never lower it. -pub const FLOOR: usize = 661; +pub const FLOOR: usize = 662; /// One top-level menu's coverage. #[derive(Clone, Debug, serde::Serialize)] diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index 69399fc068..595cde2755 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -550,3 +550,28 @@ fn proof_setup_presets_and_checkmarks() { let params = crate::filter_dialog::parse_spec(spec.params); assert!(matches!(¶ms[0].kind, crate::filter_dialog::Kind::Choice { options, .. } if options[0] == "srgb" && !options.iter().any(|v| v.contains('/')))); } + +/// Layer › Copy CSS puts the layer's CSS on the clipboard, as Photoshop's does (#9372). +#[test] +fn copy_css_puts_the_layers_css_on_the_clipboard() { + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), Default::default()); + app.session.execute("file.new", json!({"width": 400, "height": 300})).unwrap(); + app.session.execute("layer.new.layer", json!({"name": "Box"})).unwrap(); + app.session + .edit("paint", |doc, active| { + doc.layer_mut(active.unwrap()).unwrap().surface_mut().unwrap().fill_rect(photocraft_geom::Rect::new(100, 80, 300, 220), &[0.2, 0.4, 0.8, 1.0]); + Ok(()) + }) + .unwrap(); + app.sync_views(); + assert!(crate::menus::menu_items(&app).iter().any(|i| i.id == "layer.copyCSS" && i.path == ["Layer"]), "Layer › Copy CSS"); + let ctx = egui::Context::default(); + let mut result = None; + let mut out = ctx.run_ui(egui::RawInput::default(), |ui| { + result = Some(invoke(&mut app, ui.ctx(), "layer.copyCSS", json!({}))); + }); + out.textures_delta.clear(); + let css = result.unwrap().unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.starts_with(".Box {\n background-image: url(\"Box.png\");\n"), "{css}"); + assert_eq!(out.platform_output.commands, [egui::OutputCommand::CopyText(css)]); +} From 69305189f04f76263a86a224b2c15e42101cb483 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 31 Oct 2026 15:22:26 -0600 Subject: [PATCH 17/41] Copy CSS: start class names that begin with a digit with `_` (CodeRabbit review on crates/engine/src/cmd/layer_css_cmds.rs:37) A layer named "2nd Box" gave `.2nd_Box`, which isn't a valid class selector. Photoshop 2025 writes `._2nd_Box`: it puts a `_` in front of a leading digit and turns a hyphen into `_` like the other punctuation ("-2x" is `._2x`, "my-box" `.my_box`). Do the same. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 24 ++++++++++++------- crates/engine/src/cmd/layer_css_cmds/tests.rs | 10 ++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 47d33f1b70..60a7a83b68 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -1,11 +1,11 @@ //! Layer › Copy CSS (#9372): CSS for the selected layers, written as Photoshop writes it. The //! command returns the text; the shell puts it on the clipboard. //! -//! Each layer is a class named after it (characters CSS doesn't allow in a name become `_`): -//! a type layer gives its font, colour, line height and alignment, a solid shape or fill layer -//! its colour, any other layer an image named after it; then the opacity when it isn't 100 %, -//! the absolute position (and size, except for type), and its place in the stack as `z-index`, -//! counted from the bottom layer as 1. +//! Each layer is a class named after it (punctuation and spaces become `_`, and a leading digit +//! gets a `_` in front): a type layer gives its font, colour, line height and alignment, a solid +//! shape or fill layer its colour, any other layer an image named after it; then the opacity when +//! it isn't 100 %, the absolute position (and size, except for type), and its place in the stack +//! as `z-index`, counted from the bottom layer as 1. use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, text::TextAlign}; use serde_json::{Value, json}; @@ -32,10 +32,18 @@ pub fn number(v: f64) -> String { if s == "-0" { "0".into() } else { s.to_string() } } -/// The class name for a layer: its name with every character CSS doesn't allow in a name as `_`. +/// The class name for a layer: its name with every character other than a letter, digit or `_` +/// as `_` (a hyphen too, as Photoshop does), and a `_` in front when it starts with a digit, +/// which a class selector can't. pub fn class_name(name: &str) -> String { - let s: String = name.chars().map(|c| if c.is_alphanumeric() || c == '-' || c == '_' { c } else { '_' }).collect(); - if s.is_empty() { "layer".into() } else { s } + let s: String = name.chars().map(|c| if c.is_alphanumeric() || c == '_' { c } else { '_' }).collect(); + if s.is_empty() { + "layer".into() + } else if s.starts_with(|c: char| c.is_ascii_digit()) { + format!("_{s}") + } else { + s + } } fn rgb(c: &photocraft_color::Color) -> String { diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 6fa2a39e4b..c59560ed35 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -81,6 +81,16 @@ fn numbers_and_names_are_written_as_photoshop_does() { assert_eq!(class_name(""), "layer"); } +/// Photoshop 2025: a class can't start with a digit, so a layer named "2nd Box" gets a `_` in +/// front; a hyphen becomes `_` like the other punctuation ("-2x" is `._2x`, "my-box" `.my_box`). +#[test] +fn class_names_never_start_with_a_digit() { + for (name, class) in [("2nd Box", "._2nd_Box {\n"), ("-2x", "._2x {\n"), ("my-box", ".my_box {\n")] { + let css = session(name).execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.starts_with(class), "{name}: {css}"); + } +} + #[test] fn bad_params_and_layers_without_css_are_errors() { let mut s = session("Box"); From fc662291881dcf0883a9c7573c961ae123107847 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 31 Oct 2026 15:25:45 -0600 Subject: [PATCH 18/41] Copy CSS: escape layer and font names in quoted values (CodeRabbit review on crates/engine/src/cmd/layer_css_cmds.rs:73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A `"` in a layer name ended `url("…")` early, a backslash started an escape, and a `"` in a font family was turned into `'`, which names another font. Write each name as a CSS string the way CSSOM serializes one (`\"`, `\\`, hex escapes for control characters). Photoshop 2025 writes these names unescaped (`url("Say "hi".png")`); ordinary names come out exactly as before. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 33 ++++++++++++++++--- crates/engine/src/cmd/layer_css_cmds/tests.rs | 17 ++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 60a7a83b68..9bdd85d5f0 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -46,6 +46,31 @@ pub fn class_name(name: &str) -> String { } } +/// `s` as a double-quoted CSS string, escaped as CSSOM serializes one: `"` and `\` get a +/// backslash, control characters (line breaks among them) become hex escapes, NUL becomes U+FFFD. +pub fn quoted(s: &str) -> String { + let mut out = String::with_capacity(s.len() + 2); + out.push('"'); + for c in s.chars() { + match c { + '\0' => out.push('\u{FFFD}'), + '\u{1}'..='\u{1F}' | '\u{7F}' => out.push_str(&format!("\\{:x} ", u32::from(c))), + '"' | '\\' => { + out.push('\\'); + out.push(c); + } + _ => out.push(c), + } + } + out.push('"'); + out +} + +/// The image Photoshop names after a layer, as a `url()`. +fn image(l: &Layer) -> String { + format!("url({})", quoted(&format!("{}.png", l.name))) +} + fn rgb(c: &photocraft_color::Color) -> String { let [r, g, b] = c.to_rgb().map(|v| (v.clamp(0.0, 1.0) * 255.0).round() as u8); format!("rgb({r}, {g}, {b})") @@ -78,7 +103,7 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { _ => "justify", }; props.push(("font-size", format!("{}px", number(f64::from(size_pt) * px_per_pt)))); - props.push(("font-family", format!("\"{}\"", family.replace('"', "'")))); + props.push(("font-family", quoted(family))); props.push(("color", rgb(&color))); props.push(("line-height", number(line_height))); props.push(("text-align", align.into())); @@ -87,7 +112,7 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { } LayerContent::Shape(sh) => match &sh.fill { Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), - _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + _ => props.push(("background-image", image(l))), }, LayerContent::Fill(f) => { // A fill layer without a shape covers the canvas. @@ -96,10 +121,10 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { } match f { Fill::Solid(c) => props.push(("background-color", rgb(c))), - _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + _ => props.push(("background-image", image(l))), } } - _ => props.push(("background-image", format!("url(\"{}.png\")", l.name))), + _ => props.push(("background-image", image(l))), } if bounds.is_empty() { return None; diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index c59560ed35..59526d9692 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -91,6 +91,23 @@ fn class_names_never_start_with_a_digit() { } } +/// Names go into quoted CSS strings: a `"`, a backslash or a line break in one is escaped, so the +/// string doesn't end early and keeps the name (Photoshop writes them unescaped, which breaks +/// the rule). Ordinary names are written as before. +#[test] +fn names_in_quoted_values_are_escaped() { + let css = session("Say \"hi\"").execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" background-image: url(\"Say \\\"hi\\\".png\");\n"), "{css}"); + let css = session("a\\b\nc").execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" background-image: url(\"a\\\\b\\a c.png\");\n"), "{css}"); + let doc = session("Box").active().unwrap().doc.clone(); + let mut cache = photocraft_raster::Surface::new(photocraft_color::PixelFormat::RGBA8); + cache.fill_rect(Rect::new(49, 28, 120, 52), &[0.0, 0.0, 0.0, 1.0]); + let text = photocraft_doc::TextLayer { font_family: "My \"Font\"".into(), size_pt: 24.0, cache: Some(cache), ..Default::default() }; + let css = rule(&doc, 3, &Layer::new("Title", LayerContent::Text(text))).unwrap_or_default(); + assert!(css.contains(" font-family: \"My \\\"Font\\\"\";\n"), "{css}"); +} + #[test] fn bad_params_and_layers_without_css_are_errors() { let mut s = session("Box"); From fc49818c585ce61fa0b31a6f1527d123fb3c146c Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 31 Oct 2026 15:28:12 -0600 Subject: [PATCH 19/41] Copy CSS: place paragraph text at its box and give it a size (CodeRabbit review on crates/engine/src/cmd/layer_css_cmds.rs:78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every type layer was written like point text: no width or height, placed at its first pixel. Photoshop 2025 writes paragraph text differently. For a 200 × 120 box at (60, 40) whose two lines span 156 × 51 px it writes `left: 59.937px; top: 36.948px; width: 156px; height: 51px;`: placed at the box (within a few px, from its font metrics), moved down by an explicit leading (36 px gives `top: 72.948px`), and sized by its text rather than the box (centred "Hi" in the same box: `width: 19px; height: 17px;`). Do the same; point text keeps its position only. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 28 ++++++++++++---- crates/engine/src/cmd/layer_css_cmds/tests.rs | 32 +++++++++++++++++++ 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 9bdd85d5f0..de9008b36c 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -4,10 +4,12 @@ //! Each layer is a class named after it (punctuation and spaces become `_`, and a leading digit //! gets a `_` in front): a type layer gives its font, colour, line height and alignment, a solid //! shape or fill layer its colour, any other layer an image named after it; then the opacity when -//! it isn't 100 %, the absolute position (and size, except for type), and its place in the stack -//! as `z-index`, counted from the bottom layer as 1. +//! it isn't 100 %, the absolute position (and size, except for point type), and its place in the +//! stack as `z-index`, counted from the bottom layer as 1. -use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, text::TextAlign}; +use photocraft_doc::text::{TextAlign, TextShape}; +use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId}; +use photocraft_geom::Point; use serde_json::{Value, json}; use crate::commands::CommandSpec; @@ -83,6 +85,8 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { let mut props: Vec<(&str, String)> = Vec::new(); let mut sized = true; let mut bounds = photocraft_doc::comps::position_bounds(l); + // Where the rule starts when it isn't where the layer's pixels start. + let mut origin: Option = None; match &l.content { LayerContent::Group(_) | LayerContent::Adjustment(_) => return None, LayerContent::Text(t) => { @@ -107,8 +111,17 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { props.push(("color", rgb(&color))); props.push(("line-height", number(line_height))); props.push(("text-align", align.into())); - // Point text has no box of its own: only its position. - sized = false; + match t.shape { + // Photoshop places paragraph text at its box, moved down by an explicit leading, + // and sizes it by its text, not the box. + TextShape::Box { x, y, .. } => { + let at = t.transform.apply(Point::new(f64::from(x), f64::from(y))); + let leading = style.and_then(|s| s.leading_pt).map_or(0.0, |v| f64::from(v) * px_per_pt); + origin = Some(Point::new(at.x, at.y + leading)); + } + // Point text has no box of its own: only its position. + _ => sized = false, + } } LayerContent::Shape(sh) => match &sh.fill { Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), @@ -133,8 +146,9 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { props.push(("opacity", number(f64::from(l.opacity.max(0.0))))); } props.push(("position", "absolute".into())); - props.push(("left", format!("{}px", number(f64::from(bounds.x0))))); - props.push(("top", format!("{}px", number(f64::from(bounds.y0))))); + let at = origin.unwrap_or(Point::new(f64::from(bounds.x0), f64::from(bounds.y0))); + props.push(("left", format!("{}px", number(at.x)))); + props.push(("top", format!("{}px", number(at.y)))); if sized { props.push(("width", format!("{}px", number(f64::from(bounds.width()))))); props.push(("height", format!("{}px", number(f64::from(bounds.height()))))); diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 59526d9692..f41bb90b81 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -70,6 +70,38 @@ fn fill_and_type_layers_describe_their_colour_and_font() { assert!(rule(&doc, 5, &group).is_none()); } +/// Photoshop 2025, paragraph text in a 200 × 120 box at (60, 40) that wraps to two lines whose +/// pixels span 156 × 51: `left: 59.937px; top: 36.948px; width: 156px; height: 51px;`. Unlike point +/// text it has a size, that of its text (not the box), and it's placed at its box, not where its +/// first pixel is; an explicit leading moves it down by that much (36 px: `top: 72.948px`). +#[test] +fn paragraph_text_is_placed_at_its_box_and_sized_by_its_text() { + let doc = session("Box").active().unwrap().doc.clone(); + let mut cache = photocraft_raster::Surface::new(photocraft_color::PixelFormat::RGBA8); + cache.fill_rect(Rect::new(62, 44, 218, 95), &[0.0, 0.0, 0.0, 1.0]); + let mut text = photocraft_doc::TextLayer { + text: "Hello world this wraps around".into(), + font_family: "Inter".into(), + size_pt: 24.0, + cache: Some(cache), + shape: photocraft_doc::text::TextShape::Box { x: 0.0, y: 0.0, width: 200.0, height: 120.0 }, + transform: photocraft_geom::Affine::translate(60.0, 40.0), + ..Default::default() + }; + let css = rule(&doc, 3, &Layer::new("Para", LayerContent::Text(text.clone()))).unwrap_or_default(); + assert_eq!( + css, + ".Para {\n font-size: 24px;\n font-family: \"Inter\";\n color: rgb(0, 0, 0);\n line-height: 1.2;\n text-align: left;\n position: absolute;\n left: 60px;\n top: 40px;\n width: 156px;\n height: 51px;\n z-index: 3;\n}\n" + ); + let style = photocraft_doc::text::CharStyle { font_family: "Inter".into(), size_pt: 24.0, leading_pt: Some(36.0), ..Default::default() }; + text.runs = vec![photocraft_doc::text::TextRun { len: text.text.len(), style }]; + let css = rule(&doc, 3, &Layer::new("Para", LayerContent::Text(text))).unwrap_or_default(); + assert!( + css.contains(" line-height: 1.5;\n text-align: left;\n position: absolute;\n left: 60px;\n top: 76px;\n width: 156px;\n height: 51px;\n"), + "{css}" + ); +} + #[test] fn numbers_and_names_are_written_as_photoshop_does() { assert_eq!(number(48.9374), "48.937"); From 38337c8c6d98ed91bf539fdd8d3b92edefe6efdd Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 00:15:09 -0600 Subject: [PATCH 20/41] Copy CSS: write a live rounded rectangle's border-radius (FredApps review) A shape layer that is still a live rectangle with rounded corners now gets `border-radius` before its fill, as Photoshop writes it: one value when all four corners are equal, else top-left, top-right, bottom-right, bottom-left, in px. Sharp rectangles write none. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 21 ++++++++++++++----- crates/engine/src/cmd/layer_css_cmds/tests.rs | 19 +++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index de9008b36c..2554f024b9 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -8,7 +8,7 @@ //! stack as `z-index`, counted from the bottom layer as 1. use photocraft_doc::text::{TextAlign, TextShape}; -use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId}; +use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape}; use photocraft_geom::Point; use serde_json::{Value, json}; @@ -123,10 +123,21 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { _ => sized = false, } } - LayerContent::Shape(sh) => match &sh.fill { - Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), - _ => props.push(("background-image", image(l))), - }, + LayerContent::Shape(sh) => { + // A live rounded rectangle's corners, before the fill as Photoshop writes them: one + // value when all four are equal, else top-left, top-right, bottom-right, bottom-left. + if let Some(LiveShape::Rect { radii, .. }) = &sh.live + && radii.iter().any(|&r| r > 0.0) + { + let px = |r: f64| format!("{}px", number(r.max(0.0))); + let all = if radii.iter().all(|&r| r == radii[0]) { px(radii[0]) } else { radii.map(px).join(" ") }; + props.push(("border-radius", all)); + } + match &sh.fill { + Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), + _ => props.push(("background-image", image(l))), + } + } LayerContent::Fill(f) => { // A fill layer without a shape covers the canvas. if bounds.is_empty() { diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index f41bb90b81..06a46b1224 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -151,3 +151,22 @@ fn bad_params_and_layers_without_css_are_errors() { let mut empty = Session::new(); assert!(empty.execute(ID, json!({})).is_err(), "no document"); } + +/// A live rounded rectangle gives its corners as Photoshop writes them, before the fill: one +/// value when all four are equal, else top-left, top-right, bottom-right, bottom-left; a sharp +/// one writes none. +#[test] +fn a_rounded_rectangle_writes_its_border_radius() { + let mut s = session("Box"); + let id = s.execute("shape.create", json!({"kind": "roundedRect", "rect": [40, 30, 120, 80], "radius": 12, "fill": "#ff0000"})).unwrap()["layer"] + .as_u64() + .unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" {\n border-radius: 12px;\n background-color: rgb(255, 0, 0);\n position: absolute;\n"), "{css}"); + s.execute("shape.edit", json!({"layer": id, "radii": [20, 0, 10.5, 5]})).unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" border-radius: 20px 0px 10.5px 5px;\n background-color: rgb(255, 0, 0);\n"), "{css}"); + s.execute("shape.edit", json!({"layer": id, "radii": [0, 0, 0, 0]})).unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(!css.contains("border-radius") && css.contains(" background-color: rgb(255, 0, 0);\n"), "{css}"); +} From 64fa77d5a66c0bb831fc1f0c1a687e709112c5ce Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 00:15:09 -0600 Subject: [PATCH 21/41] Copy CSS: say exactly what the module writes and what it doesn't (FredApps review) The module doc said it writes CSS "as Photoshop writes it", but strokes, layer effects, CSS gradients, blend modes and fill opacity are never written. List what each kind of layer gives, in order, and what is left out. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 2554f024b9..61a6cd5008 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -1,11 +1,20 @@ -//! Layer › Copy CSS (#9372): CSS for the selected layers, written as Photoshop writes it. The +//! Layer › Copy CSS (#9372): CSS for the selected layers, in the form Photoshop writes. The //! command returns the text; the shell puts it on the clipboard. //! //! Each layer is a class named after it (punctuation and spaces become `_`, and a leading digit -//! gets a `_` in front): a type layer gives its font, colour, line height and alignment, a solid -//! shape or fill layer its colour, any other layer an image named after it; then the opacity when -//! it isn't 100 %, the absolute position (and size, except for point type), and its place in the -//! stack as `z-index`, counted from the bottom layer as 1. +//! gets a `_` in front). What is written, in this order: +//! - a type layer: `font-size`, `font-family`, `color`, `line-height` and `text-align`, from its +//! first run and first paragraph; +//! - a live rounded rectangle: `border-radius`; +//! - a shape or fill layer with a solid colour: `background-color`; any other layer (pixels, +//! gradient or pattern fills, smart objects): `background-image`, an image named after it; +//! - `opacity` when it isn't 100 %; +//! - `position: absolute`, `left` and `top`, and `width` and `height` except for point type; +//! - `z-index`, its place in the stack counted from the bottom layer as 1. +//! +//! Not written: strokes (`border`), layer effects (`box-shadow`, `text-shadow`), gradients as +//! CSS gradients, blend modes (`mix-blend-mode`), fill opacity, and the styles of later runs and +//! paragraphs. Groups and adjustment layers have no rule. use photocraft_doc::text::{TextAlign, TextShape}; use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape}; From d4622f78f23dedc8ab0de8d061fdc90d5011b080 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 00:18:06 -0600 Subject: [PATCH 22/41] Copy CSS: test a comment closer in a name and a layer with a drop shadow (FredApps review) A layer named `a */ b` writes no `*/` outside its quoted image name and a sanitised class; a layer with a drop shadow writes the same rule as without it, with no shadow and no panic. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds/tests.rs | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 06a46b1224..0d4ecc3b89 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -170,3 +170,45 @@ fn a_rounded_rectangle_writes_its_border_radius() { let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); assert!(!css.contains("border-radius") && css.contains(" background-color: rgb(255, 0, 0);\n"), "{css}"); } + +/// `css` without its double-quoted strings (escapes inside them skipped). +fn outside_strings(css: &str) -> String { + let (mut out, mut quoted, mut escaped) = (String::new(), false, false); + for c in css.chars() { + match (quoted, escaped, c) { + (true, true, _) => escaped = false, + (true, false, '\\') => escaped = true, + (_, false, '"') => quoted = !quoted, + (false, _, _) => out.push(c), + _ => {} + } + } + out +} + +/// A name with a comment closer can't end a comment or break the rule: outside the quoted image +/// name there is no `*/`, and the class is sanitised. +#[test] +fn a_comment_closer_in_a_name_stays_inside_the_string() { + let css = session("a */ b").execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(!outside_strings(&css).contains("*/"), "{css}"); + assert!(css.starts_with(".a____b {\n background-image: url(\"a */ b.png\");\n"), "{css}"); +} + +/// Layer effects aren't written: a layer with a drop shadow gives the same rule as without it, +/// placed and sized by its pixels, not the shadow. +#[test] +fn a_layer_with_a_drop_shadow_writes_its_rule_without_the_effect() { + let mut s = session("Box"); + let plain = s.execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + s.edit("fx", |doc, active| { + let l = doc.layer_mut(active.unwrap()).unwrap(); + l.effects.enabled = true; + l.effects.items.push(photocraft_doc::effects::Effect::default_drop_shadow()); + Ok(()) + }) + .unwrap(); + let css = s.execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert_eq!(css, plain); + assert!(!css.contains("shadow"), "{css}"); +} From 1bdba8264d84f0496478f7c2ee0fca1405b128fc Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 01:02:22 -0600 Subject: [PATCH 23/41] Copy CSS: write border-radius: 50% for a live ellipse (CodeRabbit review on layer_css_cmds.rs:147) A solid live ellipse got the plain rectangle rule, so pasting it showed a rectangle. It now writes `border-radius: 50%;` where a rounded rectangle writes its radii, before the fill. The module doc lists it, and lists the geometry of other shapes (live polygons, stars and lines, custom paths) as not written. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 22 +++++++++++-------- crates/engine/src/cmd/layer_css_cmds/tests.rs | 13 +++++++++++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 61a6cd5008..309825e094 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -5,7 +5,7 @@ //! gets a `_` in front). What is written, in this order: //! - a type layer: `font-size`, `font-family`, `color`, `line-height` and `text-align`, from its //! first run and first paragraph; -//! - a live rounded rectangle: `border-radius`; +//! - a live rounded rectangle: `border-radius`; a live ellipse: `border-radius: 50%`; //! - a shape or fill layer with a solid colour: `background-color`; any other layer (pixels, //! gradient or pattern fills, smart objects): `background-image`, an image named after it; //! - `opacity` when it isn't 100 %; @@ -13,8 +13,9 @@ //! - `z-index`, its place in the stack counted from the bottom layer as 1. //! //! Not written: strokes (`border`), layer effects (`box-shadow`, `text-shadow`), gradients as -//! CSS gradients, blend modes (`mix-blend-mode`), fill opacity, and the styles of later runs and -//! paragraphs. Groups and adjustment layers have no rule. +//! CSS gradients, blend modes (`mix-blend-mode`), fill opacity, the styles of later runs and +//! paragraphs, and the geometry of other shapes (live polygons, stars and lines, and custom +//! paths), which get the rule of their box. Groups and adjustment layers have no rule. use photocraft_doc::text::{TextAlign, TextShape}; use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape}; @@ -135,12 +136,15 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { LayerContent::Shape(sh) => { // A live rounded rectangle's corners, before the fill as Photoshop writes them: one // value when all four are equal, else top-left, top-right, bottom-right, bottom-left. - if let Some(LiveShape::Rect { radii, .. }) = &sh.live - && radii.iter().any(|&r| r > 0.0) - { - let px = |r: f64| format!("{}px", number(r.max(0.0))); - let all = if radii.iter().all(|&r| r == radii[0]) { px(radii[0]) } else { radii.map(px).join(" ") }; - props.push(("border-radius", all)); + // A live ellipse fills its box, which half the box's size on each axis rounds to. + match &sh.live { + Some(LiveShape::Rect { radii, .. }) if radii.iter().any(|&r| r > 0.0) => { + let px = |r: f64| format!("{}px", number(r.max(0.0))); + let all = if radii.iter().all(|&r| r == radii[0]) { px(radii[0]) } else { radii.map(px).join(" ") }; + props.push(("border-radius", all)); + } + Some(LiveShape::Ellipse { .. }) => props.push(("border-radius", "50%".into())), + _ => {} } match &sh.fill { Some(Fill::Solid(c)) => props.push(("background-color", rgb(c))), diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 0d4ecc3b89..ae6470efc1 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -171,6 +171,19 @@ fn a_rounded_rectangle_writes_its_border_radius() { assert!(!css.contains("border-radius") && css.contains(" background-color: rgb(255, 0, 0);\n"), "{css}"); } +/// A live ellipse writes `border-radius: 50%;` where a rounded rectangle writes its radii, so the +/// rule draws an ellipse, not a rectangle; other live shapes (a star here) write no geometry. +#[test] +fn an_ellipse_writes_a_half_border_radius() { + let mut s = session("Box"); + let id = s.execute("shape.create", json!({"kind": "ellipse", "rect": [40, 30, 120, 80], "fill": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" {\n border-radius: 50%;\n background-color: rgb(255, 0, 0);\n position: absolute;\n"), "{css}"); + let star = s.execute("shape.create", json!({"kind": "star", "rect": [40, 30, 120, 80], "fill": "#ff0000"})).unwrap()["layer"].as_u64().unwrap(); + let css = s.execute(ID, json!({"layer": star})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(!css.contains("border-radius") && css.contains(" {\n background-color: rgb(255, 0, 0);\n"), "{css}"); +} + /// `css` without its double-quoted strings (escapes inside them skipped). fn outside_strings(css: &str) -> String { let (mut out, mut quoted, mut escaped) = (String::new(), false, false); From 13e7b0fe0e2aa19afc609279ddbd81a8fd98b68b Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 01:03:54 -0600 Subject: [PATCH 24/41] Copy CSS: test a rounded rectangle's border-radius after a 2x scale (CodeRabbit review on layer_css_cmds/tests.rs:165) No test checked the copied border-radius after `shape.edit`'s `transform` scales the live radii. With radii 12 and a uniform 2x scale the rule now has to say `border-radius: 24px;`, so a regression in that scaling fails the test. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds/tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index ae6470efc1..818f6057d5 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -169,6 +169,11 @@ fn a_rounded_rectangle_writes_its_border_radius() { s.execute("shape.edit", json!({"layer": id, "radii": [0, 0, 0, 0]})).unwrap(); let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); assert!(!css.contains("border-radius") && css.contains(" background-color: rgb(255, 0, 0);\n"), "{css}"); + // Scaled 2× on both axes, its corners are twice as round. + s.execute("shape.edit", json!({"layer": id, "radii": [12, 12, 12, 12]})).unwrap(); + s.execute("shape.edit", json!({"layer": id, "transform": [2, 0, 0, 2, 0, 0]})).unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" border-radius: 24px;\n background-color: rgb(255, 0, 0);\n"), "{css}"); } /// A live ellipse writes `border-radius: 50%;` where a rounded rectangle writes its radii, so the From 0f6524ffbd4e50b6b2698210de02cd122e066542 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sun, 1 Nov 2026 01:06:16 -0600 Subject: [PATCH 25/41] Copy CSS: write no border-radius for an unequally scaled rounded rectangle (CodeRabbit review on layer_css_cmds.rs:144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scaled 200 % across and 100 % down, a live rounded rectangle keeps one radius per corner (r times the smaller scale), while its path, which is what renders, has r·sx by r·sy elliptical corners. The rule wrote the single circular radius. It now writes border-radius only when the path's anchors are the ones the live radii draw (in any order, so a flipped shape still writes its corners); otherwise none, as the module doc says. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 21 +++++++++++++++---- crates/engine/src/cmd/layer_css_cmds/tests.rs | 17 +++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index 309825e094..fbb5db9770 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -14,11 +14,12 @@ //! //! Not written: strokes (`border`), layer effects (`box-shadow`, `text-shadow`), gradients as //! CSS gradients, blend modes (`mix-blend-mode`), fill opacity, the styles of later runs and -//! paragraphs, and the geometry of other shapes (live polygons, stars and lines, and custom -//! paths), which get the rule of their box. Groups and adjustment layers have no rule. +//! paragraphs, the corners of a rounded rectangle scaled unequally (elliptical, while it keeps +//! one radius per corner), and the geometry of other shapes (live polygons, stars and lines, and +//! custom paths), which get the rule of their box. Groups and adjustment layers have no rule. use photocraft_doc::text::{TextAlign, TextShape}; -use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape}; +use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape, Path}; use photocraft_geom::Point; use serde_json::{Value, json}; @@ -88,6 +89,17 @@ fn rgb(c: &photocraft_color::Color) -> String { format!("rgb({r}, {g}, {b})") } +/// Whether `path` is the outline `live` draws: every anchor of one is an anchor of the other, +/// within a hundredth of a pixel, in any order or direction (a flipped shape runs the other way). +/// A live rectangle scaled unequally keeps one radius per corner, but its path keeps the corners +/// it was drawn with, now elliptical, so the two differ. +fn draws(live: &LiveShape, path: &Path) -> bool { + let anchors = |p: &Path| p.subpaths.iter().flat_map(|s| s.knots.iter().map(|k| k.anchor)).collect::>(); + let (have, want) = (anchors(path), anchors(&photocraft_vector::shapes::live_path(live))); + let among = |p: &Point, q: &[Point]| q.iter().any(|q| (p.x - q.x).abs() < 0.01 && (p.y - q.y).abs() < 0.01); + have.iter().all(|p| among(p, &want)) && want.iter().all(|p| among(p, &have)) +} + /// The rule for one layer, `z` its place in the stack from the bottom (1-based); `None` for a /// layer CSS can't describe (groups, adjustments) or one with nothing to place. pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { @@ -136,9 +148,10 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { LayerContent::Shape(sh) => { // A live rounded rectangle's corners, before the fill as Photoshop writes them: one // value when all four are equal, else top-left, top-right, bottom-right, bottom-left. + // Scaled unequally, its corners are elliptical though it keeps one radius each: none. // A live ellipse fills its box, which half the box's size on each axis rounds to. match &sh.live { - Some(LiveShape::Rect { radii, .. }) if radii.iter().any(|&r| r > 0.0) => { + Some(live @ LiveShape::Rect { radii, .. }) if radii.iter().any(|&r| r > 0.0) && draws(live, &sh.path) => { let px = |r: f64| format!("{}px", number(r.max(0.0))); let all = if radii.iter().all(|&r| r == radii[0]) { px(radii[0]) } else { radii.map(px).join(" ") }; props.push(("border-radius", all)); diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 818f6057d5..375e4bae4c 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -176,6 +176,23 @@ fn a_rounded_rectangle_writes_its_border_radius() { assert!(css.contains(" border-radius: 24px;\n background-color: rgb(255, 0, 0);\n"), "{css}"); } +/// Scaled 200 % across and 100 % down, a rounded rectangle's corners are 24 × 12 px ellipses, but +/// it keeps one radius per corner (12): no `border-radius` rather than a circular one. A flipped +/// one, whose outline runs the other way, keeps its circular corners and writes them. +#[test] +fn an_unequally_scaled_rounded_rectangle_writes_no_border_radius() { + let mut s = session("Box"); + let create = json!({"kind": "roundedRect", "rect": [40, 30, 120, 80], "radius": 12, "fill": "#ff0000"}); + let id = s.execute("shape.create", create.clone()).unwrap()["layer"].as_u64().unwrap(); + s.execute("shape.edit", json!({"layer": id, "transform": [2, 0, 0, 1, 0, 0]})).unwrap(); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(!css.contains("border-radius") && css.contains(" {\n background-color: rgb(255, 0, 0);\n"), "{css}"); + let flipped = s.execute("shape.create", create).unwrap()["layer"].as_u64().unwrap(); + s.execute("shape.edit", json!({"layer": flipped, "transform": [-1, 0, 0, 1, 400, 0]})).unwrap(); + let css = s.execute(ID, json!({"layer": flipped})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains(" {\n border-radius: 12px;\n background-color: rgb(255, 0, 0);\n"), "{css}"); +} + /// A live ellipse writes `border-radius: 50%;` where a rounded rectangle writes its radii, so the /// rule draws an ellipse, not a rectangle; other live shapes (a star here) write no geometry. #[test] From dee9cacba800987a4886df3c24646dea8196de68 Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Thu, 5 Nov 2026 22:51:39 -0600 Subject: [PATCH 26/41] Copy CSS: wait for a pending Free Transform, as Save for Web does (CodeRabbit review on invoke.rs:90) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Free Transform keeps its box in a preview until it is committed; the document's layers stay where they were. Layer › Copy CSS reads the document, so with a box moved but not yet committed it put the old left/top/width/height on the clipboard, not what the canvas showed. Copy CSS now joins Save for Web (#6737) in the transform tool's guard: the menu item is disabled under an open box, and any caller (menu, shortcut, palette, control channel) gets "Commit or cancel the transform first", with nothing copied and the box left open. After Cancel it copies the old place, after a commit the new one. Co-Authored-By: Claude Opus 5.5 --- .../src/tools/transform_tool/commit.rs | 11 +++-- .../ui-egui/src/tools/transform_tool/tests.rs | 41 +++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tools/transform_tool/commit.rs b/crates/ui-egui/src/tools/transform_tool/commit.rs index 2f799609e9..282567543c 100644 --- a/crates/ui-egui/src/tools/transform_tool/commit.rs +++ b/crates/ui-egui/src/tools/transform_tool/commit.rs @@ -326,6 +326,9 @@ pub(crate) fn nudge(app: &mut PhotocraftApp, dx: f64, dy: f64) { /// Save for Web (Legacy): refused under an open box, as it would export without the preview (#6737). pub(crate) const SAVE_FOR_WEB: &str = "file.export.saveForWebLegacy"; +/// Layer › Copy CSS: refused under an open box too, as it would copy the bounds from before it. +const COPY_CSS: &str = photocraft_engine::layer_css_cmds::ID; + /// While transforming, Undo and Redo apply to the box: `Some(enabled)` for those commands (and /// Toggle Last State, which would change the document under the box), `None` for the rest. pub fn is_enabled(app: &PhotocraftApp, id: &str) -> Option { @@ -349,7 +352,8 @@ pub fn is_enabled(app: &PhotocraftApp, id: &str) -> Option { // No Toggle Last State or history jump under the box, and one box at a time. "edit.toggleLastState" | "history.selectState" | "edit.contentAwareScale" | "edit.puppetWarp" => Some(false), // Save for Web exports the committed document and would ignore the pending box (#6737). - SAVE_FOR_WEB => Some(false), + // Copy CSS, likewise, would copy the layers' bounds from before the box. + SAVE_FOR_WEB | COPY_CSS => Some(false), // Rotate and Flip turn the box (not while warping, where the mesh is the box). _ if box_preset(id).is_some() => Some(t.warp.is_none()), // One box over several layers doesn't warp (#6501). @@ -397,7 +401,8 @@ fn box_preset(id: &str) -> Option<(f64, f64, f64)> { /// `None` for other commands or when not transforming. /// The commands the open box answers itself ([`is_enabled`], [`intercept`]). fn box_command(id: &str) -> bool { - matches!(id, "edit.undo" | "edit.redo" | "edit.toggleLastState" | "edit.contentAwareScale" | "edit.puppetWarp" | SAVE_FOR_WEB) || box_preset(id).is_some() + matches!(id, "edit.undo" | "edit.redo" | "edit.toggleLastState" | "edit.contentAwareScale" | "edit.puppetWarp" | SAVE_FOR_WEB | COPY_CSS) + || box_preset(id).is_some() } pub fn intercept(app: &mut PhotocraftApp, id: &str) -> Option> { @@ -408,7 +413,7 @@ pub fn intercept(app: &mut PhotocraftApp, id: &str) -> Option Some(Ok(step(app, false))), "edit.redo" => Some(Ok(step(app, true))), - "edit.toggleLastState" | "history.selectState" | "edit.contentAwareScale" | "edit.puppetWarp" | SAVE_FOR_WEB => { + "edit.toggleLastState" | "history.selectState" | "edit.contentAwareScale" | "edit.puppetWarp" | SAVE_FOR_WEB | COPY_CSS => { Some(Err("Commit or cancel the transform first".into())) } _ => { diff --git a/crates/ui-egui/src/tools/transform_tool/tests.rs b/crates/ui-egui/src/tools/transform_tool/tests.rs index 08d24d6607..0eda60ba1d 100644 --- a/crates/ui-egui/src/tools/transform_tool/tests.rs +++ b/crates/ui-egui/src/tools/transform_tool/tests.rs @@ -1148,6 +1148,47 @@ fn save_for_web_is_off_under_a_pending_transform() { assert!(crate::menus::is_enabled(&app, SAVE_FOR_WEB), "back after the box closes"); } +/// Layer › Copy CSS reads the committed document, so, as Save for Web (#6737), it is off while a +/// box is pending: the clipboard never gets the bounds from before the move. After Cancel it +/// copies the old place, after a commit the new one. +#[test] +fn copy_css_is_off_under_a_pending_transform() { + let id = photocraft_engine::layer_css_cmds::ID; + let ctx = egui::Context::default(); + let mut app = app_with_square(64, photocraft_geom::Rect::new(8, 8, 24, 24)); + let copy_css = |app: &mut PhotocraftApp| { + let mut result = None; + let mut out = ctx.run_ui(egui::RawInput::default(), |ui| result = Some(crate::menus::invoke(app, ui.ctx(), id, json!({})))); + out.textures_delta.clear(); + (result.unwrap(), out.platform_output.commands) + }; + let moved = |app: &mut PhotocraftApp| { + crate::menus::invoke(app, &egui::Context::default(), "edit.freeTransform", json!({})).unwrap(); + let t = app.ui.transform.as_mut().unwrap(); + t.quad = t.quad.map(|[x, y]| [x + 20.0, y]); + }; + assert!(crate::menus::is_enabled(&app, id), "enabled with no box"); + moved(&mut app); + assert!(!crate::menus::is_enabled(&app, id), "off under the box"); + let (result, clipboard) = copy_css(&mut app); + assert!(result.is_err(), "refused under the box: {result:?}"); + assert!(clipboard.is_empty(), "nothing reaches the clipboard: {clipboard:?}"); + assert!(app.ui.transform.is_some(), "the box stays open"); + cancel(&mut app); + assert!(crate::menus::is_enabled(&app, id), "back after Cancel"); + let (result, clipboard) = copy_css(&mut app); + let css = result.unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains("left: 8px;"), "{css}"); + assert_eq!(clipboard, [egui::OutputCommand::CopyText(css)]); + moved(&mut app); + commit(&mut app); + assert!(app.ui.transform.is_none() && crate::menus::is_enabled(&app, id), "back after the commit"); + let (result, clipboard) = copy_css(&mut app); + let css = result.unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.contains("left: 28px;"), "the moved place: {css}"); + assert_eq!(clipboard, [egui::OutputCommand::CopyText(css)]); +} + /// #352: ⌥⌘T transforms a copy. OK leaves the original and a moved copy as one history step; /// Cancel leaves no copy and nothing to redo; with a selection the copy holds the selected /// pixels only. From fa5dfb3e19b33b67c103ff91ca04ff511e6860fb Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 7 Nov 2026 21:56:49 -0600 Subject: [PATCH 27/41] Regenerate the parity checklist Main added a Layer menu item of its own, so after the rebase the menu counts 663 items; raise the floor to match. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/menus/parity.rs | 2 +- docs/parity-checklist.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/menus/parity.rs b/crates/ui-egui/src/menus/parity.rs index 71d5a16046..f320b4a4a4 100644 --- a/crates/ui-egui/src/menus/parity.rs +++ b/crates/ui-egui/src/menus/parity.rs @@ -7,7 +7,7 @@ use crate::menu_catalog::CATALOG; use crate::menus::is_live; /// Minimum number of live catalog items. Raise it when parity grows; never lower it. -pub const FLOOR: usize = 662; +pub const FLOOR: usize = 663; /// One top-level menu's coverage. #[derive(Clone, Debug, serde::Serialize)] diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 7c69231573..6fe46dfbfa 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -2,14 +2,14 @@ Generated by `cargo xtask parity` from `crates/ui-egui/src/menu_catalog.rs` (Photoshop's menu tree) and the live command registry. Do not edit by hand. -**662 of 662 menu items live (100.0%).** +**663 of 663 menu items live (100.0%).** | Menu | Live | Total | % | |---|---:|---:|---:| | File | 52 | 52 | 100% | | Edit | 75 | 75 | 100% | | Image | 61 | 61 | 100% | -| Layer | 162 | 162 | 100% | +| Layer | 163 | 163 | 100% | | Type | 74 | 74 | 100% | | Select | 25 | 25 | 100% | | Filter | 75 | 75 | 100% | From dfd21539f626eecfca8d5c6ed31c33a61f45960c Mon Sep 17 00:00:00 2001 From: Hector Villarreal Date: Sat, 7 Nov 2026 21:57:04 -0600 Subject: [PATCH 28/41] Regenerate scorecard Co-Authored-By: Claude Opus 5.5 --- docs/scorecard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scorecard.md b/docs/scorecard.md index 31443c1949..b5d4e381b2 100644 --- a/docs/scorecard.md +++ b/docs/scorecard.md @@ -11,7 +11,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js | [Tools](#tools) | 36 | 9 | 0 | | | [Workspace and UI](#workspace-and-ui) | 15 | 6 | 2 | settings that do nothing: 10 of 199 (target 0) | | [Type](#type) | 5 | 5 | 0 | | -| [Automation](#automation) | 5 | 4 | 2 | 662 of 662 menu items live (100.0%) | +| [Automation](#automation) | 5 | 4 | 2 | 663 of 663 menu items live (100.0%) | | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present | | [Distribution](#distribution) | 5 | 5 | 1 | | | [Open bugs](#open-bugs) | 31 | 1 | 0 | | @@ -256,7 +256,7 @@ Unread: `general.color_picker`, `workspace.auto_show_hidden_panels`, `workspace. ## Automation -Menu wiring (`docs/parity-checklist.md`): 662 of 662 menu items live (100.0%). This counts dispatch, not behaviour. +Menu wiring (`docs/parity-checklist.md`): 663 of 663 menu items live (100.0%). This counts dispatch, not behaviour. | Id | Target | Status | Issue | Note | |---|---|---|---|---| From 64c6d98421c6108a490a95ea5dd3ecb296590caf Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 15:30:38 +0100 Subject: [PATCH 29/41] Background Eraser: arrow steps past the Angle's ends no longer alert; more Angle tests The field consumes the arrow keys it steps with, so the step check now reads them before the field. New tests: arrow steps stop at +-180 without the alert, a click-away commits a typed 400 with one alert, a non-number keeps the angle, and the Magic Eraser check finds any field named Angle. Co-Authored-By: Claude Opus 5.5 --- .../src/background_eraser_bar_angle_tests.rs | 50 +++++++++++++++++++ crates/ui-egui/src/tools/eraser_ui.rs | 4 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs index 3311742421..5d4eb7e164 100644 --- a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs +++ b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs @@ -143,7 +143,57 @@ fn the_field_shows_the_brush_settings_angle() { #[test] fn the_magic_eraser_has_neither() { + let bg = bar(Tool::BackgroundEraser); + assert!(bg.query_by_label("Angle").is_some(), "the Background Eraser's field is found by its name"); let h = bar(Tool::MagicEraser); assert!(angle_field(&h).is_none()); + assert!(h.query_by_label("Angle").is_none(), "no field named Angle, whatever its tooltip"); assert!(h.query_by_label(PRESSURE).is_none()); } + +/// Focus the field and press `key` `n` times, then Enter. +fn step_angle(h: &mut Harness<'static, PhotocraftApp>, key: egui::Key, n: usize) -> f32 { + angle_field(h).expect("the Angle field").click(); + h.run_steps(1); + for _ in 0..n { + h.key_press(key); + h.run_steps(1); + } + h.key_press(egui::Key::Enter); + h.run_steps(2); + h.state().session.tools.brush.angle +} + +#[test] +fn arrow_steps_stop_at_the_ends_without_the_alert() { + let mut h = bar(Tool::BackgroundEraser); + type_angle(&mut h, "178"); + assert_eq!(step_angle(&mut h, egui::Key::ArrowUp, 5), 180.0); + type_angle(&mut h, "-178"); + assert_eq!(step_angle(&mut h, egui::Key::ArrowDown, 5), -180.0); + assert!(alerts(&h).is_empty(), "stepping is not typing: {:?}", alerts(&h)); +} + +#[test] +fn a_click_away_commits_with_the_alert() { + let mut h = bar(Tool::BackgroundEraser); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + h.event(egui::Event::Text("400".into())); + h.run_steps(1); + h.get_by_label(PRESSURE).click(); + h.run_steps(3); + assert_eq!(h.state().session.tools.brush.angle, 180.0); + assert_eq!(alerts(&h).len(), 1, "one alert on click-away: {:?}", alerts(&h)); +} + +#[test] +fn an_entry_that_is_not_a_number_keeps_the_angle_without_the_alert() { + let mut h = bar(Tool::BackgroundEraser); + type_angle(&mut h, "30"); + for text in ["", "abc", "inf", "NaN"] { + assert_eq!(type_angle(&mut h, text), 30.0, "{text:?}"); + } + assert!(alerts(&h).is_empty(), "{:?}", alerts(&h)); +} diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index 09d927ac7a..c390f24f55 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -102,6 +102,8 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b ui.add(icons::image("rotate-cw", 15.0, t.text_dim)).on_hover_text(tip); // A wider range than the angle's, so a typed 400 reaches us and can be told apart from 180. let mut a = b.angle; + // Read before the field: it consumes the arrow keys it steps with. + let arrow_or_wheel = ui.input(|i| i.key_pressed(egui::Key::ArrowUp) || i.key_pressed(egui::Key::ArrowDown) || i.smooth_scroll_delta.y != 0.0); let r = widgets::value_field_named(ui, tl!("Angle"), &mut a, -ANGLE_TYPED_MAX..=ANGLE_TYPED_MAX, "°", 52.0); let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); // The flag lives only while an entry is being typed: drawn without the keyboard, the field @@ -114,7 +116,7 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b let clamped = whole.clamp(-180.0, 180.0); b.angle = clamped; // Only typing alerts: a scrub or an arrow-key step past the end just stops there. - let stepped = r.dragged() || ui.input(|i| i.key_pressed(egui::Key::ArrowUp) || i.key_pressed(egui::Key::ArrowDown) || i.smooth_scroll_delta.y != 0.0); + let stepped = r.dragged() || arrow_or_wheel; let typed_out = whole != clamped && !stepped; ui.data_mut(|d| d.insert_temp(out_of_range, typed_out)); } From fcba4c875bb1492122dbc868bf02f5d25a2cf3db Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 15:49:52 +0100 Subject: [PATCH 30/41] Background Eraser: pin preview = commit for a channel target on a locked layer; LiveDab::unlocked usage Co-Authored-By: Claude Opus 5.5 --- ...ckground_eraser_transparency_lock_tests.rs | 25 +++++++++++++++++++ crates/engine/src/cmd/retouch_cmds/dab.rs | 4 ++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs index ea83a7bd5c..66f7727e58 100644 --- a/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs +++ b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs @@ -71,6 +71,31 @@ fn a_drag_and_the_live_preview_erase_a_transparency_locked_layer_too() { assert!(target(&s).locks.transparency); } +#[test] +fn with_a_colour_channel_target_the_preview_matches_the_commit_on_a_locked_layer() { + // A channel target erases colour channels only (towards the background colour) and never + // changes alpha, so the lock the preview keeps there gives the commit's pixels exactly. The + // stroke crosses the band's edge, so transparent pixels are under the tip too. + let mut s = session(8); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + let opts = |pts: &[[f64; 2]]| json!({"points": pts, "size": 16, "hardness": 0.5, "target": {"colors": [1]}}); + let all = [[8.0, 12.0], [32.0, 12.0], [56.0, 12.0]]; + let mut live = live_background_eraser(&s, &opts(&all[..1])).unwrap(); + for q in &all[1..] { + live.push(&[photocraft_paint::StrokePoint::new(q[0], q[1], 1.0)]).unwrap(); + } + let id = s.active().unwrap().active_layer.unwrap(); + let shown = live.doc.layer(id).unwrap().surface().unwrap().clone(); + let before = alphas(&s); + s.execute("paint.backgroundEraser", opts(&all)).unwrap(); + let surf = target(&s).surface().unwrap(); + assert!(surf.rgba(32, 12)[1] > 0.0, "the green channel moved towards the white background"); + for (x, y) in (0..40).flat_map(|y| (0..64).map(move |x| (x, y))) { + assert_eq!(shown.rgba(x, y), surf.rgba(x, y), "({x}, {y}): preview = commit"); + } + assert_eq!(alphas(&s), before, "alpha untouched"); +} + #[test] fn locked_pixels_and_lock_all_still_refuse() { for locks in [json!({"pixels": true}), json!({"all": true})] { diff --git a/crates/engine/src/cmd/retouch_cmds/dab.rs b/crates/engine/src/cmd/retouch_cmds/dab.rs index 70ba5683ed..a950ad5992 100644 --- a/crates/engine/src/cmd/retouch_cmds/dab.rs +++ b/crates/engine/src/cmd/retouch_cmds/dab.rs @@ -538,7 +538,9 @@ impl LiveDab { } /// Mix the dabs back without the layer's transparency lock, for a tool that erases a locked - /// layer anyway (the Background Eraser). Points shown before this keep the lock. + /// layer anyway (the Background Eraser). Call it before pushing any points: build the dab with + /// the stroke's points taken out, then [`Self::push`] them (as `live_background_eraser` does), + /// because points pushed before it were already mixed back with the lock. pub(crate) fn unlocked(mut self) -> Self { self.lock = false; self From 62c5d6283c432a7014e61a2aab8a51a4e1aa23e7 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 17:34:32 +0100 Subject: [PATCH 31/41] Copy CSS: groups, fill layers and point type as the reference application writes them Measured in the reference application: - A group writes its box (the canvas) and z-index, then the rule of each layer in it, top first, with no blank line between rules. A group's end takes a place in the stack, so z-index counts it. - A Solid Color fill layer without a shape greys Copy CSS out; so does a selection with no layer that has CSS. - Point type is placed by its line box: left is the pixel left less the ink's offset from the origin; top centres the line box on the pixels, or on half the cap height above the baseline when the text has a descender. Left and top are cut after three decimals, not rounded. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/layer_css_cmds.rs | 175 +++++++++++++++--- crates/engine/src/cmd/layer_css_cmds/tests.rs | 111 ++++++++++- 2 files changed, 256 insertions(+), 30 deletions(-) diff --git a/crates/engine/src/cmd/layer_css_cmds.rs b/crates/engine/src/cmd/layer_css_cmds.rs index fbb5db9770..d63fcb3263 100644 --- a/crates/engine/src/cmd/layer_css_cmds.rs +++ b/crates/engine/src/cmd/layer_css_cmds.rs @@ -10,17 +10,26 @@ //! gradient or pattern fills, smart objects): `background-image`, an image named after it; //! - `opacity` when it isn't 100 %; //! - `position: absolute`, `left` and `top`, and `width` and `height` except for point type; -//! - `z-index`, its place in the stack counted from the bottom layer as 1. +//! - `z-index`, its place in the stack counted from the bottom layer as 1, where a group takes +//! two places (its own, and one below its layers for the group's end). +//! +//! A group writes only its box (the canvas, or its artboard) and z-index, followed by the rule +//! of every layer in it, top first. A fill layer without a vector mask and an adjustment layer +//! have no rule, and Copy CSS is off when no selected layer has one. Point type is placed as +//! Photoshop places it (see [`place_point_text`]). //! //! Not written: strokes (`border`), layer effects (`box-shadow`, `text-shadow`), gradients as //! CSS gradients, blend modes (`mix-blend-mode`), fill opacity, the styles of later runs and //! paragraphs, the corners of a rounded rectangle scaled unequally (elliptical, while it keeps //! one radius per corner), and the geometry of other shapes (live polygons, stars and lines, and -//! custom paths), which get the rule of their box. Groups and adjustment layers have no rule. +//! custom paths), which get the rule of their box. -use photocraft_doc::text::{TextAlign, TextShape}; -use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape, Path}; -use photocraft_geom::Point; +use std::collections::HashMap; +use std::sync::PoisonError; + +use photocraft_doc::text::{Orientation, TextAlign, TextShape}; +use photocraft_doc::{Document, Fill, Layer, LayerContent, LayerId, LiveShape, Path, TextLayer}; +use photocraft_geom::{Point, Rect}; use serde_json::{Value, json}; use crate::commands::CommandSpec; @@ -32,14 +41,44 @@ fn bad(message: impl Into) -> EngineError { EngineError::BadParams { cmd: ID.into(), msg: message.into() } } +/// Deepest group nesting followed; deeper layers are left out rather than recursing without end. +const MAX_DEPTH: usize = 256; + fn enabled(s: &Session) -> std::result::Result<(), String> { let st = s.active().ok_or("no document open")?; - if st.selected_layers().is_empty() { Err("no layer selected".into()) } else { Ok(()) } + let ids = st.selected_layers(); + if ids.is_empty() { + return Err("no layer selected".into()); + } + // Photoshop greys Copy CSS out for a fill layer without a shape (measured), and for an + // adjustment layer, which has nothing to place either. + if st.doc.walk().iter().any(|(_, _, l)| ids.contains(&l.id) && has_css(l)) { Ok(()) } else { Err("no selected layer has CSS".into()) } +} + +/// Whether a layer can have a rule (one with nothing to place still gets none). +fn has_css(l: &Layer) -> bool { + match &l.content { + LayerContent::Adjustment(_) => false, + LayerContent::Fill(_) => l.vector_mask.is_some(), + _ => true, + } } /// A number as Photoshop writes it in CSS: at most three decimals, no trailing zeros. pub fn number(v: f64) -> String { let v = if v.is_finite() { (v * 1000.0).round() / 1000.0 } else { 0.0 }; + decimals(v) +} + +/// A `left` or `top` as Photoshop writes it: cut after three decimals, not rounded (measured: +/// 49.8125 is `49.812px`, 176.5668 is `176.566px`). The nudge keeps 127.1, computed as +/// 127.0999…, at `127.1`. +pub fn position(v: f64) -> String { + let v = if v.is_finite() { (v * 1000.0 + 1e-6).floor() / 1000.0 } else { 0.0 }; + decimals(v) +} + +fn decimals(v: f64) -> String { let s = format!("{v:.3}"); let s = s.trim_end_matches('0').trim_end_matches('.'); if s == "-0" { "0".into() } else { s.to_string() } @@ -100,8 +139,59 @@ fn draws(live: &LiveShape, path: &Path) -> bool { have.iter().all(|p| among(p, &want)) && want.iter().all(|p| among(p, &have)) } +/// Where Photoshop places point type, from its pixel bounds `pix`, its ink `ink` (`[x0, y0, x1, +/// y1]` from its origin, unrounded), its first baseline `baseline` in the same space, the cap +/// height `cap` of its font and its size and line height in px. Measured on Arial and Times New +/// Roman at 24 and 48 px, with auto and explicit leading: +/// - `left` is the pixel left less the ink's offset from the origin ("Hello": 52 − 1.875 = +/// `50.125`); +/// - without a descender, the line box is centred on the pixels ("Hello", pixels 132–151, line +/// 28.8: 141.5 − 14.4 = `127.1`); +/// - with one, on half the cap height above the baseline the pixels give ("xyz" in Arial, top +/// pixel 187, ink top −12.5625, cap 17.19: 199.5625 − (28.8 + 17.19) / 2 = `176.566`). +pub fn place_point_text(pix: Rect, ink: [f64; 4], baseline: f64, cap: f64, size_px: f64, line_height_px: f64) -> Point { + let left = f64::from(pix.x0) - ink[0]; + // An "o" overshoots the baseline by a hair, a "g" by a fifth of the size. + let top = if ink[3] - baseline > 0.05 * size_px { + f64::from(pix.y0) - (ink[1] - baseline) - (line_height_px + cap) / 2.0 + } else { + (f64::from(pix.y0) + f64::from(pix.y1)) / 2.0 - line_height_px / 2.0 + }; + Point::new(left, top) +} + +/// [`place_point_text`] for a type layer, from its layout; `None` (placed at its pixels) when +/// there is nothing to measure: no pixels or ink, no font, or type that is turned, scaled, +/// warped or vertical. +fn point_text_origin(t: &TextLayer, pix: Rect, dpi: f32, family: &str, size_pt: f32, line_height: f64) -> Option { + let [a, b, c, d, _, _] = t.transform.m; + if pix.is_empty() || a != 1.0 || b != 0.0 || c != 0.0 || d != 1.0 || t.warp.is_some() || t.orientation != Orientation::Horizontal { + return None; + } + let size_px = f64::from(size_pt) * f64::from(dpi) / 72.0; + let cap_layer = TextLayer { text: "H".into(), font_family: family.into(), size_pt, ..Default::default() }; + let mut eng = photocraft_text::shared().lock().unwrap_or_else(PoisonError::into_inner); + let layout = eng.layout(t, dpi); + let ink = photocraft_text::render::ink_bounds(&layout)?; + let baseline = f64::from(layout.lines.first()?.baseline); + let cap_layout = eng.layout(&cap_layer, dpi); + let cap = f64::from(cap_layout.lines.first()?.baseline) - photocraft_text::render::ink_bounds(&cap_layout)?[1]; + // Photoshop works with the line height it writes, three decimals of the size. + let line_height_px = (line_height * 1000.0).round() / 1000.0 * size_px; + let at = place_point_text(pix, ink, baseline, cap, size_px, line_height_px); + (at.x.is_finite() && at.y.is_finite()).then_some(at) +} + +/// The box of a group's rule: its artboard, else the canvas (measured: a group holding a 50 × 30 +/// layer writes the 400 × 300 canvas). +fn group_bounds(doc: &Document, l: &Layer) -> Rect { + let r = photocraft_doc::comps::position_bounds(l); + if r.is_empty() { doc.bounds() } else { r } +} + /// The rule for one layer, `z` its place in the stack from the bottom (1-based); `None` for a -/// layer CSS can't describe (groups, adjustments) or one with nothing to place. +/// layer CSS can't describe (adjustments, fill layers without a shape) or one with nothing to +/// place. A group's rule is its box alone; [`copy_css`] adds the rules of its layers. pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { let px_per_pt = f64::from(doc.resolution_dpi.max(1.0)) / 72.0; let mut props: Vec<(&str, String)> = Vec::new(); @@ -109,8 +199,12 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { let mut bounds = photocraft_doc::comps::position_bounds(l); // Where the rule starts when it isn't where the layer's pixels start. let mut origin: Option = None; + if !has_css(l) { + return None; + } match &l.content { - LayerContent::Group(_) | LayerContent::Adjustment(_) => return None, + LayerContent::Adjustment(_) => return None, + LayerContent::Group(_) => bounds = group_bounds(doc, l), LayerContent::Text(t) => { let style = t.runs.first().map(|r| &r.style); let size_pt = style.map_or(t.size_pt, |s| s.size_pt); @@ -142,7 +236,10 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { origin = Some(Point::new(at.x, at.y + leading)); } // Point text has no box of its own: only its position. - _ => sized = false, + _ => { + sized = false; + origin = point_text_origin(t, bounds, doc.resolution_dpi.max(1.0), family, size_pt, line_height); + } } } LayerContent::Shape(sh) => { @@ -165,9 +262,12 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { } } LayerContent::Fill(f) => { - // A fill layer without a shape covers the canvas. + // Only a fill layer with a vector mask (a shape) gets here: placed at its outline. if bounds.is_empty() { - bounds = doc.bounds(); + let outline = l.vector_mask.as_ref().and_then(|m| m.path.control_bounds()); + bounds = outline.map_or(Rect::EMPTY, |(x0, y0, x1, y1)| { + Rect::new(x0.floor() as i32, y0.floor() as i32, x1.ceil() as i32, y1.ceil() as i32).intersect(&doc.bounds()) + }); } match f { Fill::Solid(c) => props.push(("background-color", rgb(c))), @@ -184,8 +284,8 @@ pub fn rule(doc: &Document, z: usize, l: &Layer) -> Option { } props.push(("position", "absolute".into())); let at = origin.unwrap_or(Point::new(f64::from(bounds.x0), f64::from(bounds.y0))); - props.push(("left", format!("{}px", number(at.x)))); - props.push(("top", format!("{}px", number(at.y)))); + props.push(("left", format!("{}px", position(at.x)))); + props.push(("top", format!("{}px", position(at.y)))); if sized { props.push(("width", format!("{}px", number(f64::from(bounds.width()))))); props.push(("height", format!("{}px", number(f64::from(bounds.height()))))); @@ -215,21 +315,50 @@ fn copy_css(s: &mut Session, p: &Value) -> Result { return Err(EngineError::NoLayer(*id)); } } - // In Layers panel order, top first. - let rules: Vec<(u64, String)> = walk - .iter() - .enumerate() - .rev() - .filter(|(_, (_, _, l))| ids.contains(&l.id)) - .filter_map(|(i, (_, _, l))| rule(&st.doc, i + 1, l).map(|r| (l.id.0, r))) - .collect(); + let mut z = HashMap::new(); + stack_places(&st.doc.layers, &mut 0, &mut z, 0); + // In Layers panel order, top first: a group, then its layers (measured). + let mut picked = Vec::new(); + panel_order(&st.doc.layers, false, &ids, &mut picked, 0); + let rules: Vec<(u64, String)> = picked.into_iter().filter_map(|l| z.get(&l.id).and_then(|&z| rule(&st.doc, z, l)).map(|r| (l.id.0, r))).collect(); if rules.is_empty() { - return Err(EngineError::Other("Copy CSS needs a pixel, type, shape or fill layer with content".into())); + return Err(EngineError::Other("Copy CSS needs a pixel, type, shape or group layer with content".into())); } - let css = rules.iter().map(|(_, r)| r.as_str()).collect::>().join("\n"); + // Photoshop writes a group's rules one after another, with no blank line between them. + let css: String = rules.iter().map(|(_, r)| r.as_str()).collect(); Ok(json!({"css": css, "layers": rules.iter().map(|(id, _)| id).collect::>()})) } +/// Every layer's `z-index`, counted from the bottom: a group's layers come first, after one place +/// for the group's end, then the group (measured: Background 1, group end 2, its layer 3, the +/// group 4, the layer above it 5). +fn stack_places(layers: &[Layer], n: &mut usize, out: &mut HashMap, depth: usize) { + for l in layers { + if let Some(children) = l.children() { + *n += 1; + if depth < MAX_DEPTH { + stack_places(children, n, out, depth + 1); + } + } + *n += 1; + out.insert(l.id, *n); + } +} + +/// The layers whose rules are copied, top first: the selected ones and everything inside a +/// selected group, each once. +fn panel_order<'a>(layers: &'a [Layer], inside_picked: bool, ids: &[LayerId], out: &mut Vec<&'a Layer>, depth: usize) { + for l in layers.iter().rev() { + let take = inside_picked || ids.contains(&l.id); + if take { + out.push(l); + } + if let Some(children) = l.children().filter(|_| depth < MAX_DEPTH) { + panel_order(children, take, ids, out, depth + 1); + } + } +} + pub fn specs() -> Vec { vec![CommandSpec { id: ID, diff --git a/crates/engine/src/cmd/layer_css_cmds/tests.rs b/crates/engine/src/cmd/layer_css_cmds/tests.rs index 375e4bae4c..368b965874 100644 --- a/crates/engine/src/cmd/layer_css_cmds/tests.rs +++ b/crates/engine/src/cmd/layer_css_cmds/tests.rs @@ -41,12 +41,14 @@ fn a_pixel_layer_copies_as_photoshop_writes_it() { #[test] fn fill_and_type_layers_describe_their_colour_and_font() { let doc = session("Box").active().unwrap().doc.clone(); - // Photoshop: a solid colour gives `background-color` (a fill layer without a shape covers the - // canvas). - let fill = Layer::new("Card", LayerContent::Fill(Fill::Solid(photocraft_color::Color::rgb(1.0, 120.0 / 255.0, 30.0 / 255.0)))); + // Photoshop: a solid colour gives `background-color`. A fill layer is a shape with a vector + // mask, placed at its outline; without one it has no rule (Copy CSS is greyed out, measured). + let mut fill = Layer::new("Card", LayerContent::Fill(Fill::Solid(photocraft_color::Color::rgb(1.0, 120.0 / 255.0, 30.0 / 255.0)))); + assert!(rule(&doc, 4, &fill).is_none()); + fill.vector_mask = Some(photocraft_doc::VectorMask::new(photocraft_vector::shapes::rect(250.0, 200.0, 120.0, 60.0))); assert_eq!( rule(&doc, 4, &fill).unwrap(), - ".Card {\n background-color: rgb(255, 120, 30);\n position: absolute;\n left: 0px;\n top: 0px;\n width: 400px;\n height: 300px;\n z-index: 4;\n}\n" + ".Card {\n background-color: rgb(255, 120, 30);\n position: absolute;\n left: 250px;\n top: 200px;\n width: 120px;\n height: 60px;\n z-index: 4;\n}\n" ); // A type layer: size, family, colour, auto leading and alignment, then only its position // (Photoshop writes no size for point text). Its position is where its pixels are. @@ -65,9 +67,89 @@ fn fill_and_type_layers_describe_their_colour_and_font() { css, ".Title {\n font-size: 24px;\n font-family: \"Inter\";\n color: rgb(0, 0, 0);\n line-height: 1.2;\n text-align: left;\n position: absolute;\n left: 49px;\n top: 28px;\n z-index: 3;\n}\n" ); - // Groups and adjustments have no CSS. + // A group's own rule is its box, the canvas. let group = Layer::group("Group 1", Vec::new()); - assert!(rule(&doc, 5, &group).is_none()); + assert_eq!( + rule(&doc, 5, &group).unwrap(), + ".Group_1 {\n position: absolute;\n left: 0px;\n top: 0px;\n width: 400px;\n height: 300px;\n z-index: 5;\n}\n" + ); +} + +/// Measured: Layer › Copy CSS on a group holding a 50 × 30 layer "2nd-Box" at (10, 20) writes the +/// group's canvas box, then the layer, with no blank line; the group's end takes a place in the +/// stack, so the layer is 3 and the group 4 above the Background. +#[test] +fn a_group_writes_its_box_then_its_layers() { + let mut s = Session::new(); + s.execute("file.new", json!({"width": 400, "height": 300})).unwrap(); + s.execute("layer.new.layer", json!({"name": "2nd-Box"})).unwrap(); + s.edit("paint", |doc, active| { + doc.layer_mut(active.unwrap()).unwrap().surface_mut().unwrap().fill_rect(Rect::new(10, 20, 60, 50), &[0.16, 0.35, 0.78, 1.0]); + Ok(()) + }) + .unwrap(); + s.execute("layer.groupLayers", json!({})).unwrap(); + s.execute("layer.new.layer", json!({"name": "Top"})).unwrap(); + s.edit("paint", |doc, active| { + doc.layer_mut(active.unwrap()).unwrap().surface_mut().unwrap().fill_rect(Rect::new(300, 200, 320, 220), &[0.16, 0.35, 0.78, 1.0]); + Ok(()) + }) + .unwrap(); + let group = s.active().unwrap().doc.walk().into_iter().find(|(_, _, l)| l.children().is_some()).unwrap().2.id.0; + let css = s.execute(ID, json!({"layer": group})).unwrap()["css"].as_str().unwrap().to_string(); + let rest = css.split_once(' ').unwrap().1; + assert_eq!( + rest, + "{\n position: absolute;\n left: 0px;\n top: 0px;\n width: 400px;\n height: 300px;\n z-index: 4;\n}\n\ + ._2nd_Box {\n background-image: url(\"2nd-Box.png\");\n position: absolute;\n left: 10px;\n top: 20px;\n width: 50px;\n height: 30px;\n z-index: 3;\n}\n" + ); + let css = s.execute(ID, json!({})).unwrap()["css"].as_str().unwrap().to_string(); + assert!(css.starts_with(".Top {\n") && css.contains(" z-index: 5;\n"), "{css}"); +} + +/// Measured: Copy CSS is greyed out for a Solid Color fill layer without a shape. +#[test] +fn copy_css_is_off_for_a_fill_layer_without_a_shape() { + let mut s = session("Box"); + assert!(s.is_enabled(ID)); + s.execute("layer.newFillLayer.solidColor", json!({})).unwrap(); + assert!(!s.is_enabled(ID), "a plain fill layer has no CSS"); + assert!(s.execute(ID, json!({})).is_err()); +} + +/// Point type as Photoshop placed it (measured: text bounds and pixel bounds from its scripting +/// interface, then the copied CSS). +#[test] +fn point_type_is_placed_as_photoshop_places_it() { + let arial_cap = 1467.0 / 2048.0 * 24.0; + let times_cap = 1356.0 / 2048.0 * 24.0; + let css = |pix: Rect, ink: [f64; 4], cap: f64, size: f64, line_height: f64| { + let at = place_point_text(pix, ink, 0.0, cap, size, line_height * size); + (position(at.x), position(at.y)) + }; + let s = |a: &str, b: &str| (a.to_string(), b.to_string()); + // "Hello", Arial 24 at (50, 150). + assert_eq!(css(Rect::new(52, 132, 104, 151), [1.875, -17.25, 53.71875, 0.1875], arial_cap, 24.0, 1.2), s("50.125", "127.1")); + // The same at 48 px. + assert_eq!(css(Rect::new(53, 65, 158, 101), [3.75, -34.5, 107.4375, 0.375], arial_cap * 2.0, 48.0, 1.2), s("49.25", "54.2")); + // With a 40 pt leading: line-height 1.667. + assert_eq!(css(Rect::new(202, 82, 254, 101), [1.875, -17.25, 53.71875, 0.1875], arial_cap, 24.0, 1.667), s("200.125", "71.496")); + // "x": no descender. + assert_eq!(css(Rect::new(300, 237, 312, 250), [0.1875, -12.5625, 11.8799, 0.0], arial_cap, 24.0, 1.2), s("299.812", "229.1")); + // Descenders: "xyz", "xg", "Hg" in Arial, "Hg" and "xg" in Times New Roman. + assert_eq!(css(Rect::new(50, 187, 86, 205), [0.1875, -12.5625, 35.71875, 4.875], arial_cap, 24.0, 1.2), s("49.812", "176.566")); + assert_eq!(css(Rect::new(330, 237, 354, 255), [0.1875, -12.75, 23.6953, 4.875], arial_cap, 24.0, 1.2), s("329.812", "226.754")); + assert_eq!(css(Rect::new(302, 262, 329, 285), [1.875, -17.25, 29.0273, 4.875], arial_cap, 24.0, 1.2), s("300.125", "256.254")); + assert_eq!(css(Rect::new(50, 84, 79, 106), [0.375, -15.9375, 28.5, 5.0625], times_cap, 24.0, 1.2), s("49.625", "77.592")); + assert_eq!(css(Rect::new(150, 89, 174, 106), [0.1875, -11.0625, 23.5, 5.0625], times_cap, 24.0, 1.2), s("149.812", "77.717")); +} + +#[test] +fn positions_are_cut_after_three_decimals() { + assert_eq!(position(49.8125), "49.812"); + assert_eq!(position(141.5 - 14.4), "127.1"); + assert_eq!(position(100.0), "100"); + assert_eq!(position(f64::INFINITY), "0"); } /// Photoshop 2025, paragraph text in a 200 × 120 box at (60, 40) that wraps to two lines whose @@ -147,7 +229,7 @@ fn bad_params_and_layers_without_css_are_errors() { assert!(s.execute(ID, json!({"layer": 999_999})).is_err()); assert!(s.execute(ID, json!([])).is_err()); s.execute("layer.new.group", json!({})).unwrap(); - assert!(s.execute(ID, json!({})).is_err(), "a group alone has no CSS"); + assert!(s.execute(ID, json!({})).unwrap()["css"].as_str().unwrap().contains(" width: 400px;\n"), "an empty group writes its box"); let mut empty = Session::new(); assert!(empty.execute(ID, json!({})).is_err(), "no document"); } @@ -247,3 +329,18 @@ fn a_layer_with_a_drop_shadow_writes_its_rule_without_the_effect() { assert_eq!(css, plain); assert!(!css.contains("shadow"), "{css}"); } + +/// Real point type goes through its layout: "Hello" at a baseline of 150 is placed by its line +/// box, which starts above its first pixel (Photoshop: 127.1 for pixels from 132), not at it. +#[test] +fn point_type_is_placed_by_its_line_box() { + let mut s = session("Box"); + let id = s.execute("type.create", json!({"x": 50, "y": 150, "text": "Hello", "size": 24})).unwrap()["layer"].as_u64().unwrap(); + let doc = &s.active().unwrap().doc; + let pix = photocraft_doc::comps::position_bounds(doc.walk().into_iter().find(|(_, _, l)| l.id.0 == id).unwrap().2); + let css = s.execute(ID, json!({"layer": id})).unwrap()["css"].as_str().unwrap().to_string(); + let value = |key: &str| css.split(&format!(" {key}: ")).nth(1).and_then(|v| v.split("px;").next()).and_then(|v| v.parse::().ok()).unwrap(); + let (left, top) = (value("left"), value("top")); + assert!((left - 50.0).abs() < 1.0, "left at the origin, within the pixel rounding: {css}"); + assert!(top < f64::from(pix.y0) - 2.0 && top > 150.0 - 28.8, "top {top} above the pixels at {}: {css}", pix.y0); +} From d92aab7b7981bb567d412b0d13270ac8cc933258 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 8 Nov 2026 09:22:02 -0800 Subject: [PATCH 32/41] Updates: the updater reports installing, ready, installed and failed, and installs at exit Move the craft-libs crates pinned at c5a1cbfb (craft-ui, craft-print, craft-pdf, craft-docpath, craft-jpeg, craft-update and the hayro patches) to a craft-libs branch that merges storytold/craft-libs#687 and #696. craft-pcraft-format stays at b8f7d93b. - At the first frame, the result window shows what the last self-update came to: the version it installed, or why it could not be installed. A new `Services::last_update` reads the outcome records once; a manual check made before that frame leaves them for the next start. - A manual check that finds a release while an update installs or waits for the app to close, or while the launcher keeps this version, shows Installing, Ready (with Restart to Update) or the launcher's choice. - Closing the result window clears the updater's status and the last update's outcome. The window comes back after the startup prompt closes while that outcome is still unread. - The update helper starts when the app drops the updater at exit. --- Cargo.lock | 41 +++----- Cargo.toml | 20 ++-- apps/photocraft/src/services.rs | 1 + apps/photocraft/src/services/tests.rs | 4 +- apps/photocraft/src/updates.rs | 13 +++ crates/ui-egui/src/lib.rs | 4 +- crates/ui-egui/src/services.rs | 7 ++ crates/ui-egui/src/updates_ui.rs | 142 ++++++++++++++++++++++++-- 8 files changed, 181 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 434e4b6aa8..ede71dcfff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1406,17 +1406,17 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1439,7 +1439,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "thiserror 2.0.21", ] @@ -1457,7 +1457,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "bytemuck", "hayro", @@ -1469,7 +1469,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "craft-winprint-gdi", "log", @@ -1483,7 +1483,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1504,7 +1504,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "chrono", "dunce", @@ -1530,7 +1530,7 @@ dependencies = [ [[package]] name = "craft-winprint-gdi" version = "0.1.0" -source = "git+https://github.com/storytold/winprint.rs?rev=417ac3c4d14d3da5485a99c7d5ce8f05664ec312#417ac3c4d14d3da5485a99c7d5ce8f05664ec312" +source = "git+https://github.com/storytold/winprint.rs?rev=64e7afd4d1483512385012c340ecaaaf0f3beb7f#64e7afd4d1483512385012c340ecaaaf0f3beb7f" dependencies = [ "windows-sys 0.61.2", ] @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "bytemuck", "hayro-interpret", @@ -2994,7 +2994,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3036,7 +3036,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=c5a1cbfb5f9049f9270955caffb5bee5997aebf7#c5a1cbfb5f9049f9270955caffb5bee5997aebf7" +source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" dependencies = [ "flate2", "hayro-ccitt", @@ -9472,7 +9472,7 @@ dependencies = [ [[package]] name = "winprint" version = "0.2.1" -source = "git+https://github.com/storytold/winprint.rs?rev=5f80b9baf6b58937c401656634e42d33f00ddf49#5f80b9baf6b58937c401656634e42d33f00ddf49" +source = "git+https://github.com/storytold/winprint.rs?rev=64e7afd4d1483512385012c340ecaaaf0f3beb7f#64e7afd4d1483512385012c340ecaaaf0f3beb7f" dependencies = [ "flate2", "fmt-derive", @@ -10005,7 +10005,6 @@ dependencies = [ "nix", "typed-path", "windows-sys 0.61.2", - "zopfli", ] [[package]] @@ -10020,18 +10019,6 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" -[[package]] -name = "zopfli" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11" -dependencies = [ - "bumpalo", - "crc32fast", - "log", - "simd-adler32", -] - [[package]] name = "zune-core" version = "0.4.12" diff --git a/Cargo.toml b/Cargo.toml index f5fafa868d..e4804e565d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["serde"] } +craft-ui = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["serde"] } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } @@ -39,13 +39,13 @@ photocraft-tablet = { path = "crates/tablet" } photocraft-ipp = { path = "crates/ipp" } # external -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["raster"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } -craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } +craft-print = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +craft-pdf = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["raster"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +craft-jpeg = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "b8f7d93b00dfb8f172938f3d2d796ae62dcfe123" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7", features = ["egui"] } +craft-update = { git = "https://github.com/dotCooCoo/craft-libs", version = "=0.1.0", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["egui"] } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -205,7 +205,7 @@ egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6d518fc7 egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } # craft-pdf's vendored Hayro trees: consumers patch the same craft-libs revision (crates/pdf README). -hayro = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" } +hayro = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +hayro-syntax = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +hayro-interpret = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +hayro-jbig2 = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } diff --git a/apps/photocraft/src/services.rs b/apps/photocraft/src/services.rs index 545fc86eec..6900d71afd 100644 --- a/apps/photocraft/src/services.rs +++ b/apps/photocraft/src/services.rs @@ -763,6 +763,7 @@ pub fn native(automation: Option) -> open_url: Some(Box::new(|url: &str| open::that(url).map_err(|e| e.to_string()))), beep: Some(platform_beep), check_updates: Some(crate::updates::service()), + last_update: Some(crate::updates::last_update), clipboard_set_image: Some({ let clip = clip.clone(); guarded_clipboard_set(move |w: u32, h: u32, px: &[u8]| { diff --git a/apps/photocraft/src/services/tests.rs b/apps/photocraft/src/services/tests.rs index fb2188cdab..a89a1a327e 100644 --- a/apps/photocraft/src/services/tests.rs +++ b/apps/photocraft/src/services/tests.rs @@ -218,7 +218,9 @@ fn open_filters_keep_literal_extensions_on_windows_and_macos() { #[test] fn native_services_provide_update_transport() { - assert!(native(None).check_updates.is_some()); + let services = native(None); + assert!(services.check_updates.is_some()); + assert!(services.last_update.is_some()); } #[test] diff --git a/apps/photocraft/src/updates.rs b/apps/photocraft/src/updates.rs index a11a7b63c9..50bba88de1 100644 --- a/apps/photocraft/src/updates.rs +++ b/apps/photocraft/src/updates.rs @@ -20,6 +20,19 @@ pub fn service() -> CheckFn { }) } +/// What the last self-update came to, once: `craft-update` removes its records as it reads them. +pub fn last_update() -> Option> { + use craft_update::self_update::{Outcome, current_version, take_outcome}; + let app = &photocraft_ui_egui::UPDATE_APP; + let paths = craft_update::Paths::for_app(app).ok()?; + let version = photocraft_engine::build_info::VERSION; + let running = current_version(app, version).map_or_else(|| version.to_string(), |v| v.to_string()); + match take_outcome(&paths, &running)? { + Outcome::Installed(installed) => Some(Ok(installed.to_string())), + Outcome::Failed(reason) => Some(Err(reason)), + } +} + fn check() -> CheckResult { let http = craft_update::Http::new("PhotoCraft/Update")?; let found = craft_update::check_for_update(&photocraft_ui_egui::UPDATE_APP, &http, photocraft_engine::build_info::VERSION)?; diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index a5e84a6d87..ce62d9436f 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -262,8 +262,8 @@ pub use services::{ AdoptAutosaveFn, AppendTextFn, AutomationCommandFn, AutomationOpenPcraftFn, AutomationReadFn, AutomationWriteFn, AutosaveFn, AutosaveResultsFn, CapsLockFn, CaptionStyleFn, ClipboardGetFn, ClipboardGetSvgFn, ClipboardSetFn, ClipboardUnreadableFn, CursorPosFn, DiscardAutosaveFn, EncodePngFn, ExportFn, ExportSettings, ExternalSvgEditor, ExternalSvgSession, ExternalVectorSave, ExternalVectorSource, FileStamp, FileStampFn, FormatChoices, ImportFn, Inbox, - LoadTextFn, OpenExternalSvgFn, OpenUrlFn, OsEventsFn, PenEndFn, PhotoshopShortcutsFn, PlaceInbox, QuitFn, RecoverFn, Recoverable, RightButtonDownFn, - SameFileFn, SaveFileFn, SaveTextFn, Services, SystemThemeFn, TabletPollFn, WindowFrameFn, WriteFn, + LastUpdateFn, LoadTextFn, OpenExternalSvgFn, OpenUrlFn, OsEventsFn, PenEndFn, PhotoshopShortcutsFn, PlaceInbox, QuitFn, RecoverFn, Recoverable, + RightButtonDownFn, SameFileFn, SaveFileFn, SaveTextFn, Services, SystemThemeFn, TabletPollFn, WindowFrameFn, WriteFn, }; pub use text::bidi_text; pub use text::cjk_fonts; diff --git a/crates/ui-egui/src/services.rs b/crates/ui-egui/src/services.rs index e869f3f7e0..ffc33bb94c 100644 --- a/crates/ui-egui/src/services.rs +++ b/crates/ui-egui/src/services.rs @@ -429,6 +429,10 @@ pub type PenEndFn = Box Option + Send + Sync>; /// whether the app window is focused (to re-assert WinTab overlap priority on activation). pub type TabletPollFn = Box; +/// What the last self-update came to: `Ok` with the version it installed, `Err` with the reason it +/// could not be installed, `None` when there is nothing to report ([`Services::last_update`]). +pub type LastUpdateFn = fn() -> Option>; + /// Platform services injected by the app binary (file dialogs, codecs), keeping this crate free of /// I/O dependencies. #[derive(Default)] @@ -486,6 +490,9 @@ pub struct Services { pub alert: Option, /// Starts a background check for published releases (desktop, outside Flatpak). pub check_updates: Option, + /// What the last self-update came to, read once at the first frame: `Ok` with the version it + /// installed, `Err` with the reason it could not be installed (desktop). + pub last_update: Option, /// Files delivered asynchronously (web drag-and-drop): drained every frame and opened as /// documents. pub inbox: Option, diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index c69a3ec099..ee4489e4a6 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -11,6 +11,12 @@ pub(crate) struct Runtime { /// The startup prompt and the self-update behind it (desktop). #[cfg(not(target_arch = "wasm32"))] updater: craft_update::updater::Updater, + /// What the last self-update came to, shown in the result window until it is closed. + #[cfg(not(target_arch = "wasm32"))] + last_update: craft_update::updater::Status, + /// The check running was asked for with Help ▸ Check for Updates. + #[cfg(not(target_arch = "wasm32"))] + requested: bool, } impl Default for Runtime { @@ -20,6 +26,10 @@ impl Default for Runtime { notified_version: None, #[cfg(not(target_arch = "wasm32"))] updater: craft_update::updater::Updater::new(&crate::UPDATE_APP, photocraft_engine::build_info::VERSION), + #[cfg(not(target_arch = "wasm32"))] + last_update: craft_update::updater::Status::Idle, + #[cfg(not(target_arch = "wasm32"))] + requested: false, } } } @@ -51,11 +61,33 @@ pub(crate) fn check(app: &mut PhotocraftApp, _ctx: &egui::Context, params: Value app.updates_rt.startup_checked = true; // A release the user dismissed is offered again by a manual check. app.updates_rt.notified_version = None; + // The window shows this check from now on. + #[cfg(not(target_arch = "wasm32"))] + { + app.updates_rt.requested = true; + app.updates_rt.updater.dismiss_status(); + app.updates_rt.last_update = craft_update::updater::Status::Idle; + // A check made before the first frame leaves the last self-update's records for the + // next start. + app.services.last_update = None; + } } result } pub(crate) fn tick(app: &mut PhotocraftApp, ctx: &egui::Context) { + #[cfg(not(target_arch = "wasm32"))] + if let Some(read) = app.services.last_update.take() { + use craft_update::updater::Status as Shown; + app.updates_rt.last_update = match read() { + Some(Ok(version)) => Shown::Updated(version), + Some(Err(reason)) => Shown::InstallFailed(reason), + None => Shown::Idle, + }; + if app.updates_rt.last_update != Shown::Idle { + app.ui.updates_open = true; + } + } // `updates.status` also polls (automation may consume the result before this frame). app.session.updates.poll(); if let Status::Available { release } = &app.session.updates.status @@ -64,7 +96,19 @@ pub(crate) fn tick(app: &mut PhotocraftApp, ctx: &egui::Context) { app.updates_rt.notified_version = Some(release.version.clone()); app.ui.updates_open = true; #[cfg(not(target_arch = "wasm32"))] - app.updates_rt.updater.offer(release_of(release)); + { + let updater = &mut app.updates_rt.updater; + updater.offer(release_of(release)); + // While an update installs or waits for the app to close, or while the launcher keeps + // this version, no prompt opens: a manual check reports that state in the result window. + if std::mem::take(&mut app.updates_rt.requested) && !updater.prompt_open() { + updater.check_now(ctx); + } + } + } + #[cfg(not(target_arch = "wasm32"))] + if !matches!(app.session.updates.status, Status::Checking) { + app.updates_rt.requested = false; } if app.session.updates.check.is_none() { return; @@ -89,7 +133,7 @@ pub(crate) fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { { let was_open = app.updates_rt.updater.prompt_open(); app.updates_rt.updater.tick(ctx); - // The restart helper is scheduled before the app closes, so no update starts over unsaved work. + // An update starts, and a ready one asks the app to close, only while no work is unsaved. let clean = !app.has_unsaved_work(); match app.updates_rt.updater.show_if(ctx, clean) { craft_update::updater::Action::None => {} @@ -98,8 +142,9 @@ pub(crate) fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { // relaunches once the process exits. craft_update::updater::Action::Close => ctx.send_viewport_cmd(egui::ViewportCommand::Close), } + // The last self-update's outcome, hidden while the prompt showed, is still shown after it. if was_open && !app.updates_rt.updater.prompt_open() { - app.ui.updates_open = false; + app.ui.updates_open = app.updates_rt.last_update != craft_update::updater::Status::Idle; } } if let Some(url) = download { @@ -108,15 +153,37 @@ pub(crate) fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { if app.updates_rt.updater.prompt_open() { return; } - if app.ui.updates_open { - let dialog = craft_update::CheckResultDialog::new(&crate::UPDATE_APP, photocraft_engine::build_info::VERSION); - match dialog.show(ctx, &check_status(&app.session.updates.status)) { - craft_update::CheckResultResponse::None => {} - craft_update::CheckResultResponse::Close => app.ui.updates_open = false, - craft_update::CheckResultResponse::CheckAgain => { - let _ = check(app, ctx, serde_json::json!({})); - } + let status = shown_status(app); + let dialog = craft_update::CheckResultDialog::new(&crate::UPDATE_APP, photocraft_engine::build_info::VERSION); + match dialog.show(ctx, &status) { + craft_update::CheckResultResponse::None => {} + craft_update::CheckResultResponse::Close => { + app.ui.updates_open = false; + app.updates_rt.updater.dismiss_status(); + app.updates_rt.last_update = craft_update::updater::Status::Idle; } + craft_update::CheckResultResponse::CheckAgain => { + let _ = check(app, ctx, serde_json::json!({})); + } + craft_update::CheckResultResponse::RestartToUpdate => app.updates_rt.updater.restart_to_update(), + } +} + +/// What the open result window shows: the updater's answer to a manual check (an update installing +/// or ready, or a version the launcher keeps), else the last self-update's outcome, else the +/// engine's check. +#[cfg(not(target_arch = "wasm32"))] +fn shown_status(app: &PhotocraftApp) -> craft_update::updater::Status { + use craft_update::updater::Status as Shown; + let updater = app.updates_rt.updater.status(); + if !app.ui.updates_open { + Shown::Idle + } else if *updater != Shown::Idle { + updater.clone() + } else if app.updates_rt.last_update != Shown::Idle { + app.updates_rt.last_update.clone() + } else { + check_status(&app.session.updates.status) } } @@ -270,6 +337,59 @@ mod tests { assert!(app.updates_rt.updater.prompt_open()); } + #[cfg(not(target_arch = "wasm32"))] + fn press_escape(app: &mut PhotocraftApp, ctx: &egui::Context) { + let escape = egui::Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: egui::Modifiers::NONE }; + let mut output = ctx.run_ui(egui::RawInput { events: vec![escape], ..Default::default() }, |ui| show(app, ui.ctx())); + output.textures_delta.clear(); + } + + #[test] + #[cfg(not(target_arch = "wasm32"))] + fn the_last_update_opens_the_result_window_once_until_it_is_closed() { + use craft_update::updater::Status as Shown; + let (mut app, _, _) = app(); + app.services.last_update = Some(|| Some(Ok("99.0.0".into()))); + let ctx = egui::Context::default(); + at(&mut app, &ctx, 0.0); + assert!(app.ui.updates_open); + assert_eq!(shown_status(&app), Shown::Updated("99.0.0".into())); + assert!(app.services.last_update.is_none(), "read once"); + at(&mut app, &ctx, 1.0); + assert_eq!(shown_status(&app), Shown::Updated("99.0.0".into()), "shown until closed"); + press_escape(&mut app, &ctx); + assert!(!app.ui.updates_open); + assert_eq!(app.updates_rt.last_update, Shown::Idle); + assert_eq!(shown_status(&app), Shown::Idle); + } + + #[test] + #[cfg(not(target_arch = "wasm32"))] + fn a_failed_update_is_reported_until_a_manual_check_replaces_it() { + use craft_update::updater::Status as Shown; + let (mut app, calls, _) = app(); + app.services.last_update = Some(|| Some(Err("the installer exited with code 1603".into()))); + app.session.edit_prefs(|p| p.general.automatically_check_updates = false); + let ctx = egui::Context::default(); + at(&mut app, &ctx, 0.0); + assert_eq!(shown_status(&app), Shown::InstallFailed("the installer exited with code 1603".into())); + menus::invoke(&mut app, &ctx, "help.checkForUpdates", serde_json::json!({})).unwrap(); + assert_eq!(*calls.lock().unwrap(), 1); + assert_eq!(shown_status(&app), Shown::Checking, "the window shows the new check"); + + let (mut early, _, _) = self::app(); + early.services.last_update = Some(|| Some(Err("unread".into()))); + menus::invoke(&mut early, &ctx, "help.checkForUpdates", serde_json::json!({})).unwrap(); + at(&mut early, &ctx, 0.0); + assert_eq!(shown_status(&early), Shown::Checking, "a check before the first frame is not replaced by the last update"); + assert!(early.services.last_update.is_none()); + + let (mut quiet, _, _) = self::app(); + quiet.services.last_update = Some(|| None); + at(&mut quiet, &ctx, 0.0); + assert!(!quiet.ui.updates_open, "nothing to report opens nothing"); + } + #[test] fn a_manual_check_that_fails_to_start_opens_the_status_window() { let mut app = From 9836b213e2831d2025af1f6653c0847196fddee7 Mon Sep 17 00:00:00 2001 From: Harrison Smith Date: Sun, 8 Nov 2026 11:01:17 -0700 Subject: [PATCH 33/41] Turn Content-Aware Move's Transform On Drop on by default A fresh start and Reset Tool leave the checkbox on, so a drop shows the scale and rotate box. Enter still commits and Escape still cancels. A saved false stays off, and a missing key takes the new default. A plain move still sends paint.contentAwareMove with no scale or rotate. Fixes #12185 --- .../cam_transform_on_drop_default_tests.rs | 86 +++++++++++++++++++ crates/ui-egui/src/canvas/cam_preview.rs | 2 + crates/ui-egui/src/state/tool_options.rs | 10 ++- crates/ui-egui/src/tools/retouch_ui/tests.rs | 1 + 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 crates/ui-egui/src/cam_transform_on_drop_default_tests.rs diff --git a/crates/ui-egui/src/cam_transform_on_drop_default_tests.rs b/crates/ui-egui/src/cam_transform_on_drop_default_tests.rs new file mode 100644 index 0000000000..dc9ff9c840 --- /dev/null +++ b/crates/ui-egui/src/cam_transform_on_drop_default_tests.rs @@ -0,0 +1,86 @@ +//! Content-Aware Move › Transform On Drop starts on (#12185): a fresh start and Reset Tool give +//! the checkbox on, a drop shows the scale and rotate box, Enter commits a plain move and Escape +//! cancels it. A saved `false` stays off; a missing key takes the new default. + +use serde_json::json; + +use crate::PhotocraftApp; +use crate::canvas::{ToolEvent, tool_event}; +use crate::state::{Tool, ToolOptions}; + +fn app() -> PhotocraftApp { + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 100, "height": 60})).unwrap(); + app.run("paint.pencil", json!({"points": [[16, 30], [28, 30]], "size": 4, "color": "#0000ff"})).unwrap(); + app.run("select.rect", json!({"x": 6, "y": 14, "width": 32, "height": 32})).unwrap(); + app.ui.tool = Tool::ContentAwareMove; + app +} + +fn blue(app: &PhotocraftApp, x: i32, y: i32) -> bool { + let st = app.session.active().unwrap(); + let layer = st.active_layer.and_then(|id| st.doc.layer(id)).unwrap(); + layer.surface().unwrap().rgba(x, y)[0] < 0.5 +} + +fn drop_patch(app: &mut PhotocraftApp) { + let m = egui::Modifiers::NONE; + tool_event(app, ToolEvent::Down { x: 22.0, y: 30.0, pressure: 1.0 }, m); + tool_event(app, ToolEvent::Move { x: 72.0, y: 30.0, pressure: 1.0 }, m); + tool_event(app, ToolEvent::Up { x: 72.0, y: 30.0 }, m); +} + +#[test] +fn fresh_start_and_reset_tool_leave_transform_on_drop_on() { + assert!(ToolOptions::default().cam_transform_on_drop); + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + assert!(app.ui.tool_options.cam_transform_on_drop, "a fresh start leaves Transform On Drop on"); + app.ui.tool = Tool::ContentAwareMove; + app.ui.tool_options.cam_transform_on_drop = false; + crate::menus::invoke(&mut app, &egui::Context::default(), crate::tools::tool_reset::RESET, json!({})).unwrap(); + assert!(app.ui.tool_options.cam_transform_on_drop, "Reset Tool turns Transform On Drop back on"); +} + +#[test] +fn a_stored_false_stays_off_and_a_missing_key_is_on() { + let mut v = serde_json::to_value(ToolOptions::default()).unwrap(); + v["cam_transform_on_drop"] = json!(false); + let stored: ToolOptions = serde_json::from_value(v.clone()).unwrap(); + assert!(!stored.cam_transform_on_drop, "a saved false stays off"); + v.as_object_mut().unwrap().remove("cam_transform_on_drop"); + let missing: ToolOptions = serde_json::from_value(v).unwrap(); + assert!(missing.cam_transform_on_drop, "a missing key takes the new default"); +} + +#[test] +fn a_drop_shows_the_box_enter_commits_a_plain_move_and_escape_cancels() { + let mut app = app(); + assert!(app.ui.tool_options.cam_transform_on_drop); + let steps = app.session.active().unwrap().history.past_len(); + drop_patch(&mut app); + assert!(crate::cam_transform::active(&app), "the drop shows the box"); + assert!(blue(&app, 22, 30) && !blue(&app, 72, 30), "the document waits"); + assert_eq!(app.session.active().unwrap().history.past_len(), steps); + let place = crate::cam_transform::placement(app.ui.cam_transform.as_ref().unwrap()).unwrap(); + assert!(place.is_plain_move()); + let p = crate::cam_transform::params(&app, &place); + assert!(p.get("scaleX").is_none() && p.get("scaleY").is_none() && p.get("rotate").is_none(), "a plain move sends no scale or rotate: {p}"); + assert_eq!(p["offset"], json!([50, 0])); + + crate::cam_transform::cancel(&mut app); + assert!(!crate::cam_transform::active(&app)); + assert!(blue(&app, 22, 30) && !blue(&app, 72, 30), "Escape cancels the move"); + assert_eq!(app.session.active().unwrap().history.past_len(), steps); + assert_ne!(app.session.journal.last().map(|(id, _)| id.as_str()), Some("paint.contentAwareMove")); + + drop_patch(&mut app); + assert!(crate::cam_transform::active(&app)); + crate::cam_transform::commit(&mut app); + assert!(!crate::cam_transform::active(&app) && !app.ui.status_error, "{}", app.ui.status); + let (id, sent) = app.session.journal.last().cloned().unwrap(); + assert_eq!(id, "paint.contentAwareMove"); + assert_eq!(sent["offset"], json!([50, 0])); + assert!(sent.get("scaleX").is_none() && sent.get("scaleY").is_none() && sent.get("rotate").is_none(), "{sent}"); + assert!(blue(&app, 72, 30) && !blue(&app, 22, 30), "Enter commits the plain move"); + assert_eq!(app.session.active().unwrap().history.past_len(), steps + 1); +} diff --git a/crates/ui-egui/src/canvas/cam_preview.rs b/crates/ui-egui/src/canvas/cam_preview.rs index 68cd29f02c..7fb5c790eb 100644 --- a/crates/ui-egui/src/canvas/cam_preview.rs +++ b/crates/ui-egui/src/canvas/cam_preview.rs @@ -236,6 +236,7 @@ mod tests { app.run("paint.pencil", json!({"points": [[16, 30], [28, 30]], "size": 4, "color": "#0000ff"})).unwrap(); app.run("select.lasso", json!({"points": [[6, 14], [38, 14], [38, 46], [6, 46]]})).unwrap(); app.ui.tool = Tool::ContentAwareMove; + app.ui.tool_options.cam_transform_on_drop = false; let m = egui::Modifiers::NONE; let steps = app.session.active().unwrap().history.past_len(); @@ -317,6 +318,7 @@ mod tests { app.run("paint.pencil", json!({"points": [[150, 160], [170, 160]], "size": 12, "color": "#0000ff"})).unwrap(); app.run("select.rect", json!({"x": 10, "y": 10, "width": 300, "height": 300})).unwrap(); app.ui.tool = Tool::ContentAwareMove; + app.ui.tool_options.cam_transform_on_drop = false; let m = egui::Modifiers::NONE; tool_event(&mut app, ToolEvent::Down { x: 100.0, y: 100.0, pressure: 1.0 }, m); tool_event(&mut app, ToolEvent::Move { x: 340.0, y: 100.0, pressure: 1.0 }, m); diff --git a/crates/ui-egui/src/state/tool_options.rs b/crates/ui-egui/src/state/tool_options.rs index 12c9bc4f51..e170bcf5c6 100644 --- a/crates/ui-egui/src/state/tool_options.rs +++ b/crates/ui-egui/src/state/tool_options.rs @@ -74,7 +74,9 @@ pub struct ToolOptions { pub cam_mode: String, pub cam_structure: f32, pub cam_color: f32, - /// Content-Aware Move: Transform On Drop (a transform box on the dropped patch). + /// Content-Aware Move: Transform On Drop (a transform box on the dropped patch). On by + /// default (#12185); a saved `false` stays off. + #[serde(default = "yes")] pub cam_transform_on_drop: bool, /// Dodge/Burn: shadows | midtones | highlights, exposure %, protect tones. pub tone_range: String, @@ -465,7 +467,7 @@ impl Default for ToolOptions { cam_mode: "move".into(), cam_structure: 4.0, cam_color: 0.0, - cam_transform_on_drop: false, + cam_transform_on_drop: true, tone_range: "midtones".into(), exposure: 50.0, protect_tones: true, @@ -555,3 +557,7 @@ impl Default for ToolOptions { } } } + +#[cfg(test)] +#[path = "../cam_transform_on_drop_default_tests.rs"] +mod cam_transform_on_drop_default_tests; diff --git a/crates/ui-egui/src/tools/retouch_ui/tests.rs b/crates/ui-egui/src/tools/retouch_ui/tests.rs index e68c8b99cf..19155e15cb 100644 --- a/crates/ui-egui/src/tools/retouch_ui/tests.rs +++ b/crates/ui-egui/src/tools/retouch_ui/tests.rs @@ -621,6 +621,7 @@ fn content_aware_move_tool_lassoes_then_moves_or_extends() { app.run("paint.pencil", json!({"points": [[20, 30], [24, 30]], "size": 6, "color": "#0000ff"})).unwrap(); let blue = |app: &PhotocraftApp, x: i32| active(app).surface().unwrap().rgba(x, 30)[0] < 0.5; app.ui.tool = Tool::ContentAwareMove; + app.ui.tool_options.cam_transform_on_drop = false; app.ui.tool_options.cam_mode = mode.into(); app.ui.tool_options.cam_structure = 7.0; let m = egui::Modifiers::NONE; From 1c0580265314fe17c02cce2ca8a132c9e7f956e9 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 19:03:03 +0100 Subject: [PATCH 34/41] Background Eraser: tell the Angle's wheel steps from typing by the field's own wheel (#12186) The Angle field took any frame's scroll delta for a wheel step. That was wrong both ways: a focused field's wheel is taken out of the frame before layout, so its steps past 180 showed the range alert, and a view scroll arriving with typed text suppressed the alert (CodeRabbit). The field now asks field_wheel whether it was handed wheel notches, and only an entry made with the field's focus can alert. Co-Authored-By: Claude Opus 5.5 --- .../src/background_eraser_bar_angle_tests.rs | 54 +++++++++++++++++++ crates/ui-egui/src/tools/eraser_ui.rs | 9 ++-- crates/ui-egui/src/widgets/field_wheel.rs | 6 +++ 3 files changed, 66 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs index 5d4eb7e164..4984d4b15f 100644 --- a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs +++ b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs @@ -197,3 +197,57 @@ fn an_entry_that_is_not_a_number_keeps_the_angle_without_the_alert() { } assert!(alerts(&h).is_empty(), "{:?}", alerts(&h)); } + +fn wheel_event(lines: f32) -> egui::Event { + egui::Event::MouseWheel { + source: egui::MouseWheelSource::Unknown, + unit: egui::MouseWheelUnit::Line, + delta: vec2(0.0, lines), + phase: egui::TouchPhase::Move, + modifiers: egui::Modifiers::NONE, + } +} + +#[test] +fn wheel_steps_with_the_focus_stop_at_the_ends_without_the_alert() { + // As in the app: the focused field takes the wheel before the bar is laid out. + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 80, "height": 80})).unwrap(); + app.ui.tool = Tool::BackgroundEraser; + let mut h = Harness::builder().with_size(vec2(1600.0, 300.0)).build_ui_state( + |ui, app| { + crate::field_wheel::begin_frame(ui.ctx()); + crate::panels::options_bar(app, ui) + }, + app, + ); + PhotocraftApp::setup_context(&h.ctx, ThemeKind::ProMedium); + h.run_steps(4); + type_angle(&mut h, "178"); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + for _ in 0..5 { + h.event(wheel_event(1.0)); + h.run_steps(1); + } + h.key_press(egui::Key::Enter); + h.run_steps(2); + assert_eq!(h.state().session.tools.brush.angle, 180.0); + assert!(alerts(&h).is_empty(), "a wheel step is not typing: {:?}", alerts(&h)); +} + +#[test] +fn a_view_scroll_while_typing_keeps_the_alert() { + let mut h = bar(Tool::BackgroundEraser); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + // A scroll the field does not take (no wheel hand-off here) arrives with the typed text. + h.event(wheel_event(-3.0)); + h.event(egui::Event::Text("400".into())); + h.run_steps(1); + h.key_press(egui::Key::Enter); + h.run_steps(2); + assert_eq!(h.state().session.tools.brush.angle, 180.0); + assert_eq!(alerts(&h), vec![crate::eraser_ui::ANGLE_RANGE_MESSAGE.to_string()], "typed, so it alerts"); +} diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index 4a7bdd2f21..df51b2ce92 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -102,8 +102,10 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b ui.add(icons::image("rotate-cw", 15.0, t.text_dim)).on_hover_text(tip); // A wider range than the angle's, so a typed 400 reaches us and can be told apart from 180. let mut a = b.angle; - // Read before the field: it consumes the arrow keys it steps with. - let arrow_or_wheel = ui.input(|i| i.key_pressed(egui::Key::ArrowUp) || i.key_pressed(egui::Key::ArrowDown) || i.smooth_scroll_delta.y != 0.0); + // Read before the field: it consumes the arrow keys it steps with, and the wheel it steps + // with while focused never shows in the scroll delta (a view's scroll does, and is no step). + let arrow_or_wheel = + ui.input(|i| i.key_pressed(egui::Key::ArrowUp) || i.key_pressed(egui::Key::ArrowDown)) || crate::field_wheel::focused_field_wheeled(ui.ctx()); let r = widgets::value_field_named(ui, tl!("Angle"), &mut a, -ANGLE_TYPED_MAX..=ANGLE_TYPED_MAX, "°", 52.0); let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); // The flag lives only while an entry is being typed: drawn without the keyboard, the field @@ -117,7 +119,8 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b b.angle = clamped; // Only typing alerts: a scrub or an arrow-key step past the end just stops there. let stepped = r.dragged() || arrow_or_wheel; - let typed_out = whole != clamped && !stepped; + // A wheel step over the field without its focus is no entry either. + let typed_out = whole != clamped && !stepped && (r.has_focus() || r.lost_focus()); ui.data_mut(|d| d.insert_temp(out_of_range, typed_out)); } let r = r.on_hover_text(tip); diff --git a/crates/ui-egui/src/widgets/field_wheel.rs b/crates/ui-egui/src/widgets/field_wheel.rs index 4d2f7ada59..21d37e1bd7 100644 --- a/crates/ui-egui/src/widgets/field_wheel.rs +++ b/crates/ui-egui/src/widgets/field_wheel.rs @@ -101,6 +101,12 @@ pub fn field_gesture_running(ctx: &Context) -> bool { ctx.data(|d| d.get_temp::(gesture_id())).is_some_and(|g| matches!(g.owner, Owner::Field(_)) && now - g.last <= GESTURE_GAP) } +/// Whether [`begin_frame`] handed wheel notches to the focused value field this frame: they step +/// it as the arrow keys do, though the frame's scroll delta no longer shows them. +pub(crate) fn focused_field_wheeled(ctx: &Context) -> bool { + ctx.data(|d| d.get_temp::>(taken_id())).is_some_and(|e| !e.is_empty()) +} + /// Record that value field `id` (whose slot is `field`, as given to [`notches`]) has keyboard /// focus this frame, so the wheel is its next frame. pub fn set_focused(ctx: &Context, id: Id, field: Id) { From 8535cfb7e66267277ab36f73d20061e636f86428 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 19:03:58 +0100 Subject: [PATCH 35/41] test(engine): exact labels for every Record Measurements source (#11853) The review on #11853 noted that the tests checked only that a selection row's label did not start with "Count", never tested `auto` choosing a selection, never tested a ruler row, and read only the first row. Now each record must give exactly one row, the selection and ruler rows must be "Measurement N", `auto` with a selection must stay "Measurement N", and the shared counter is checked across all three sources. Co-Authored-By: DuBearte Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/count_record_label_tests.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/count_record_label_tests.rs b/crates/engine/src/cmd/count_record_label_tests.rs index 4ee40729de..3b49b2dd38 100644 --- a/crates/engine/src/cmd/count_record_label_tests.rs +++ b/crates/engine/src/cmd/count_record_label_tests.rs @@ -16,7 +16,9 @@ fn five_counts() -> Session { fn record(s: &mut Session, source: &str) -> Value { let r = s.execute("image.analysis.recordMeasurements", json!({"source": source})).unwrap(); - r["rows"][0]["values"].clone() + let rows = r["rows"].as_array().unwrap(); + assert_eq!(rows.len(), 1, "{source}: {r}"); + rows[0]["values"].clone() } #[test] @@ -35,7 +37,16 @@ fn other_rows_keep_their_labels_and_the_counter_is_shared() { let mut s = five_counts(); s.execute("select.rect", json!({"x": 0, "y": 0, "width": 20, "height": 20})).unwrap(); let selection = record(&mut s, "selection"); - assert!(selection["label"].as_str().is_some_and(|l| !l.starts_with("Count")), "{selection}"); + assert_eq!(selection["label"], json!("Measurement 1"), "{selection}"); let count = record(&mut s, "count"); assert_eq!(count["label"], json!("Count 2"), "{count}"); + // `auto` picks the selection over the counts, and keeps its label. + let auto = record(&mut s, "auto"); + assert_eq!(auto["source"], json!("Selection"), "{auto}"); + assert_eq!(auto["label"], json!("Measurement 3"), "{auto}"); + s.execute("image.analysis.rulerTool", json!({"start": [0, 0], "end": [3, 4]})).unwrap(); + let ruler = record(&mut s, "ruler"); + assert_eq!(ruler["label"], json!("Measurement 4"), "{ruler}"); + let count = record(&mut s, "count"); + assert_eq!(count["label"], json!("Count 5"), "{count}"); } From 3d2667d0e6e0f29d53743a37662410fdcaf7a599 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 19:12:17 +0100 Subject: [PATCH 36/41] Background Eraser: channel-target preview mixes back unlocked like its commit (#12191) On a transparency-locked layer with a colour-channel target, the live preview mixed the dabs back with the lock (straight mix) while the commit mixes premultiplied without it, so at 32 bits partly transparent pixels rounded differently in the preview. The channel branch now builds the LiveDab unlocked and pushes the points afterwards, as the RGB branch does. The test now runs at 8, 16 and 32 bits over a half-transparent strip at half opacity; it failed at 32 bits before the fix. Co-Authored-By: Claude Opus 5.5 --- ...ckground_eraser_transparency_lock_tests.rs | 44 +++++++++++-------- crates/engine/src/cmd/eraser_cmds.rs | 13 +++--- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs index 66f7727e58..a5993caa64 100644 --- a/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs +++ b/crates/engine/src/cmd/background_eraser_transparency_lock_tests.rs @@ -74,26 +74,32 @@ fn a_drag_and_the_live_preview_erase_a_transparency_locked_layer_too() { #[test] fn with_a_colour_channel_target_the_preview_matches_the_commit_on_a_locked_layer() { // A channel target erases colour channels only (towards the background colour) and never - // changes alpha, so the lock the preview keeps there gives the commit's pixels exactly. The - // stroke crosses the band's edge, so transparent pixels are under the tip too. - let mut s = session(8); - s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); - let opts = |pts: &[[f64; 2]]| json!({"points": pts, "size": 16, "hardness": 0.5, "target": {"colors": [1]}}); - let all = [[8.0, 12.0], [32.0, 12.0], [56.0, 12.0]]; - let mut live = live_background_eraser(&s, &opts(&all[..1])).unwrap(); - for q in &all[1..] { - live.push(&[photocraft_paint::StrokePoint::new(q[0], q[1], 1.0)]).unwrap(); + // changes alpha. The commit mixes back without the lock, so the preview must too: at 32 bits + // a lock-keeping mix rounds partly transparent pixels differently. The stroke crosses the + // band's edge and a half-transparent strip, at half opacity, so every mix case is under the tip. + for depth in [8, 16, 32] { + let mut s = session(depth); + s.execute("select.rect", json!({"x": 0, "y": 4, "width": 64, "height": 6, "antiAlias": false})).unwrap(); + s.execute("edit.fill", json!({"color": "#3a7fd0", "opacity": 37})).unwrap(); + s.execute("select.deselect", json!({})).unwrap(); + s.execute("layer.setProps", json!({"locks": {"transparency": true}})).unwrap(); + let opts = |pts: &[[f64; 2]]| json!({"points": pts, "size": 16, "hardness": 0.5, "opacity": 0.53, "target": {"colors": [1]}}); + let all = [[8.0, 9.0], [32.0, 10.0], [56.0, 11.0]]; + let mut live = live_background_eraser(&s, &opts(&all[..1])).unwrap(); + for q in &all[1..] { + live.push(&[photocraft_paint::StrokePoint::new(q[0], q[1], 1.0)]).unwrap(); + } + let id = s.active().unwrap().active_layer.unwrap(); + let shown = live.doc.layer(id).unwrap().surface().unwrap().clone(); + let before = alphas(&s); + s.execute("paint.backgroundEraser", opts(&all)).unwrap(); + let surf = target(&s).surface().unwrap(); + assert!(surf.rgba(32, 12)[1] > 0.0, "{depth}-bit: the green channel moved towards the white background"); + for (x, y) in (0..40).flat_map(|y| (0..64).map(move |x| (x, y))) { + assert_eq!(shown.rgba(x, y), surf.rgba(x, y), "{depth}-bit ({x}, {y}): preview = commit"); + } + assert_eq!(alphas(&s), before, "{depth}-bit: alpha untouched"); } - let id = s.active().unwrap().active_layer.unwrap(); - let shown = live.doc.layer(id).unwrap().surface().unwrap().clone(); - let before = alphas(&s); - s.execute("paint.backgroundEraser", opts(&all)).unwrap(); - let surf = target(&s).surface().unwrap(); - assert!(surf.rgba(32, 12)[1] > 0.0, "the green channel moved towards the white background"); - for (x, y) in (0..40).flat_map(|y| (0..64).map(move |x| (x, y))) { - assert_eq!(shown.rgba(x, y), surf.rgba(x, y), "({x}, {y}): preview = commit"); - } - assert_eq!(alphas(&s), before, "alpha untouched"); } #[test] diff --git a/crates/engine/src/cmd/eraser_cmds.rs b/crates/engine/src/cmd/eraser_cmds.rs index c29a2260db..b2a36fdd18 100644 --- a/crates/engine/src/cmd/eraser_cmds.rs +++ b/crates/engine/src/cmd/eraser_cmds.rs @@ -235,15 +235,18 @@ pub fn live_background_eraser(s: &Session, p: &Value) -> Result Box::new(effect), // No alpha: the commit erases nothing either. From 5dc2ad27fb571dd800f01e419218d84d2b4d0baf Mon Sep 17 00:00:00 2001 From: Harrison Smith Date: Sun, 8 Nov 2026 11:28:47 -0700 Subject: [PATCH 37/41] Show Content-Aware Move's slider popups, tooltips, and transform actions Structure and Color open a whole-number slider. A typed value outside the range opens an OK alert and keeps the closest value. While the Transform On Drop box is up, the bar is greyed and Cancel then Commit sit at the right end. Fixes #12193 --- crates/ui-egui/src/cam_options_bar_tests.rs | 187 ++++++++++++++++++++ crates/ui-egui/src/tools/retouch_ui.rs | 161 +++++++++++++---- 2 files changed, 317 insertions(+), 31 deletions(-) create mode 100644 crates/ui-egui/src/cam_options_bar_tests.rs diff --git a/crates/ui-egui/src/cam_options_bar_tests.rs b/crates/ui-egui/src/cam_options_bar_tests.rs new file mode 100644 index 0000000000..e4080c1938 --- /dev/null +++ b/crates/ui-egui/src/cam_options_bar_tests.rs @@ -0,0 +1,187 @@ +//! #12193: Content-Aware Move's Structure and Color open a whole-number slider popup, the bar's +//! controls carry the reference tooltips, a typed value outside the range alerts and keeps the +//! closest value, and a live Transform On Drop box greys the bar with Cancel then Commit at the +//! right end. Changing these controls is not a history state. + +use egui::accesskit::Role; +use egui::vec2; +use egui_kittest::Harness; +use egui_kittest::kittest::{NodeT, Queryable}; +use serde_json::json; + +use crate::PhotocraftApp; +use crate::state::{DialogKind, Tool}; + +use super::{COLOR_RANGE_ALERT, STRUCTURE_RANGE_ALERT}; + +fn app_harness(live_box: bool) -> Harness<'static, PhotocraftApp> { + let mut h = Harness::builder().with_size(vec2(1600.0, 900.0)).with_step_dt(1.0 / 60.0).build_eframe(move |cc| { + PhotocraftApp::setup_context(&cc.egui_ctx, Default::default()); + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 200, "height": 150})).unwrap(); + app.run("select.rect", json!({"x": 10, "y": 10, "width": 40, "height": 30})).unwrap(); + app.ui.tool = Tool::ContentAwareMove; + if live_box { + app.ui.tool_options.cam_transform_on_drop = true; + assert!(crate::cam_transform::begin(&mut app, [20, 8]), "the dropped patch gets a box"); + } + app + }); + h.run_steps(5); + h +} + +fn spin<'a>(h: &'a Harness<'static, PhotocraftApp>, label: &str) -> egui_kittest::Node<'a> { + h.query_all_by_role(Role::SpinButton).find(|n| n.accesskit_node().label().as_deref() == Some(label)).unwrap_or_else(|| panic!("the {label} field")) +} + +/// Types `text` into the named field, then leaves it with Tab or Enter. +fn type_field(h: &mut Harness<'static, PhotocraftApp>, label: &str, text: &str, key: egui::Key) { + spin(h, label).click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + h.event(egui::Event::Text(text.into())); + h.run_steps(1); + h.key_press(key); + h.run_steps(3); +} + +fn alert(h: &Harness<'static, PhotocraftApp>) -> Option { + h.state().ui.dialogs.iter().find(|d| d.kind == DialogKind::Error).and_then(|d| d.fields.get("message")).and_then(|m| m.as_str()).map(str::to_owned) +} + +fn steps(h: &Harness<'static, PhotocraftApp>) -> usize { + h.state().session.active().unwrap().history.past_len() +} + +fn click_at(h: &mut Harness<'static, PhotocraftApp>, p: egui::Pos2) { + h.hover_at(p); + h.run_steps(1); + h.event(egui::Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() }); + h.run_steps(1); + h.event(egui::Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() }); + h.run_steps(3); +} + +#[test] +fn structure_and_color_default_to_whole_numbers_and_open_a_slider() { + let mut h = app_harness(false); + assert_eq!(h.state().ui.tool_options.cam_structure, 4.0); + assert_eq!(h.state().ui.tool_options.cam_color, 0.0); + assert_eq!(spin(&h, "Structure:").accesskit_node().numeric_value(), Some(4.0)); + assert_eq!(spin(&h, "Color:").accesskit_node().numeric_value(), Some(0.0)); + assert!(h.query_all_by_role(Role::Slider).next().is_none(), "the slider stays closed"); + let before = steps(&h); + h.get_by_role_and_label(Role::Button, "Structure").click(); + h.run_steps(4); + let slider = h.get_by_role_and_label(Role::Slider, "Structure").rect(); + click_at(&mut h, egui::pos2(slider.right() - 3.0, slider.center().y)); + assert_eq!(h.state().ui.tool_options.cam_structure, 7.0, "the slider's far end is 7"); + assert_eq!(h.state().ui.tool_options.cam_structure.fract(), 0.0); + assert_eq!(alert(&h), None, "the slider does not alert"); + assert_eq!(steps(&h), before, "the slider is not a history state"); + h.get_by_role_and_label(Role::Button, "Color").click(); + h.run_steps(4); + let color = h.get_by_role_and_label(Role::Slider, "Color").rect(); + click_at(&mut h, egui::pos2(color.right() - 3.0, color.center().y)); + assert_eq!(h.state().ui.tool_options.cam_color, 10.0); + assert_eq!(h.state().ui.tool_options.cam_color.fract(), 0.0); + assert_eq!(steps(&h), before); +} + +#[test] +fn a_typed_value_outside_the_range_alerts_and_keeps_the_closest() { + for (label, typed, key, want, message) in [ + ("Structure:", "99", egui::Key::Enter, 7.0, STRUCTURE_RANGE_ALERT), + ("Structure:", "0", egui::Key::Tab, 1.0, STRUCTURE_RANGE_ALERT), + ("Color:", "99", egui::Key::Enter, 10.0, COLOR_RANGE_ALERT), + ("Color:", "-5", egui::Key::Tab, 0.0, COLOR_RANGE_ALERT), + ] { + let mut h = app_harness(false); + let before = steps(&h); + type_field(&mut h, label, typed, key); + let got = if label.starts_with("Structure") { h.state().ui.tool_options.cam_structure } else { h.state().ui.tool_options.cam_color }; + assert_eq!(got, want, "{label} {typed}"); + assert_eq!(alert(&h).as_deref(), Some(message), "{label} {typed}"); + assert_eq!(steps(&h), before, "{label} {typed}: not a history state"); + h.get_by_label("OK").click(); + h.run_steps(4); + assert_eq!(alert(&h), None, "{label} {typed}: OK closes the alert"); + let got = if label.starts_with("Structure") { h.state().ui.tool_options.cam_structure } else { h.state().ui.tool_options.cam_color }; + assert_eq!(got, want, "{label} {typed}: the closest value stays"); + } +} + +#[test] +fn a_typed_value_inside_the_range_is_a_whole_number_without_an_alert() { + let mut h = app_harness(false); + let before = steps(&h); + type_field(&mut h, "Structure:", "4.2", egui::Key::Tab); + assert_eq!(h.state().ui.tool_options.cam_structure, 4.0); + type_field(&mut h, "Structure:", "6", egui::Key::Enter); + assert_eq!(h.state().ui.tool_options.cam_structure, 6.0); + type_field(&mut h, "Color:", "3.6", egui::Key::Tab); + assert_eq!(h.state().ui.tool_options.cam_color, 4.0); + type_field(&mut h, "Color:", "10", egui::Key::Enter); + assert_eq!(h.state().ui.tool_options.cam_color, 10.0); + type_field(&mut h, "Color:", "0", egui::Key::Tab); + assert_eq!(h.state().ui.tool_options.cam_color, 0.0); + assert_eq!(alert(&h), None); + assert_eq!(steps(&h), before); +} + +#[test] +fn the_bar_has_the_reference_tooltips() { + for (role, label, tip) in [ + (Role::ComboBox, "Mode:", "Choose a remix mode"), + (Role::SpinButton, "Structure:", "Adjust how strictly the source structure is preserved"), + (Role::SpinButton, "Color:", "Adjust how much the source color can be modified"), + (Role::CheckBox, "Sample All Layers", "Enable to remix all layers"), + (Role::CheckBox, "Transform On Drop", "Allows rotation and scaling of selection"), + ] { + let mut h = app_harness(false); + assert!(h.query_by_label(tip).is_none(), "{label}: no tooltip before the hover"); + let at = h.query_all_by_role(role).find(|n| n.accesskit_node().label().as_deref() == Some(label)).unwrap_or_else(|| panic!("{label}")).rect().center(); + h.hover_at(at); + // The tooltip waits out its delay; the harness steps at 1/60 s. + h.run_steps(60); + assert!(h.query_by_label(tip).is_some(), "{label}: resting on it shows {tip:?}"); + } +} + +#[test] +fn a_live_transform_box_greys_the_bar_and_puts_cancel_then_commit_at_the_right() { + let h = app_harness(false); + assert!(h.query_by_label("Commit transform").is_none()); + assert!(h.query_by_label("Cancel transform").is_none()); + assert!(h.query_by_label("Lasso around an area, then drag the selection").is_some()); + + let mut h = app_harness(true); + for (role, label) in [ + (Role::Button, "New selection"), + (Role::ComboBox, "Mode:"), + (Role::SpinButton, "Structure:"), + (Role::SpinButton, "Color:"), + (Role::CheckBox, "Sample All Layers"), + (Role::CheckBox, "Transform On Drop"), + ] { + let node = h.query_all_by_role(role).find(|n| n.accesskit_node().label().as_deref() == Some(label)).unwrap_or_else(|| panic!("{label}")); + assert!(node.accesskit_node().is_disabled(), "{label} is greyed while the box is up"); + } + assert!(h.query_by_label("Lasso around an area, then drag the selection").is_none()); + let cancel = h.get_by_label("Cancel transform"); + let commit = h.get_by_label("Commit transform"); + assert!(!cancel.accesskit_node().is_disabled() && !commit.accesskit_node().is_disabled()); + let (cancel, commit) = (cancel.rect(), commit.rect()); + assert!(cancel.right() <= commit.left() + 1.0, "Cancel then Commit: {cancel:?} {commit:?}"); + let sample = h.get_by_role_and_label(Role::CheckBox, "Transform On Drop").rect(); + assert!(cancel.left() > sample.right(), "the pair sits to the right of the controls"); + assert!(commit.right() > 1200.0, "Commit is at the right end of the bar: {commit:?}"); + + let before = steps(&h); + h.get_by_label("Cancel transform").click(); + h.run_steps(4); + assert!(!crate::cam_transform::active(h.state())); + assert_eq!(steps(&h), before, "Cancel drops the box without a history state"); + assert!(!spin(&h, "Structure:").accesskit_node().is_disabled(), "the bar is usable again"); +} diff --git a/crates/ui-egui/src/tools/retouch_ui.rs b/crates/ui-egui/src/tools/retouch_ui.rs index 884c775e29..42b3679346 100644 --- a/crates/ui-egui/src/tools/retouch_ui.rs +++ b/crates/ui-egui/src/tools/retouch_ui.rs @@ -536,6 +536,128 @@ fn pct(ui: &mut egui::Ui, label: &str, v: &mut f32) { crate::widgets::value_field(ui, v, 1.0..=100.0, "%", 58.0); } +const STRUCTURE_RANGE_ALERT: &str = "An integer between 1 and 7 is required. Closest value inserted."; +const COLOR_RANGE_ALERT: &str = "An integer between 0 and 10 is required. Closest value inserted."; +const STRUCTURE_TIP: &str = "Adjust how strictly the source structure is preserved"; +const COLOR_TIP: &str = "Adjust how much the source color can be modified"; + +/// Structure or Color on the Content-Aware Move bar (#12193): a whole-number field and a slider +/// popup. A typed value outside `lo..=hi` becomes the closest value; returns true once the field +/// is left, so the caller opens the alert. A scrub stops at the end without an alert. +fn cam_integer_popup(ui: &mut egui::Ui, id: &str, name: &str, value: &mut f32, lo: f32, hi: f32, tip: &str) -> bool { + *value = if value.is_finite() { value.round().clamp(lo, hi) } else { lo }; + let draft_id = ui.make_persistent_id(egui::IdSalt::new(id)).with("typed"); + let draft = ui.ctx().data(|d| d.get_temp::<(f32, f32)>(draft_id)); + let mut typed = draft.filter(|(_, stored)| *stored == *value).map_or(*value, |(typed, _)| typed); + // Wide range so a typed 99 reaches here unclamped. The caption just before this names the field. + let r = crate::widgets::value_field(ui, &mut typed, -1.0e9..=1.0e9, "", 40.0).on_hover_text(tl!(tip)); + let out_id = r.id.with("out-of-range"); + if r.gained_focus() { + ui.ctx().data_mut(|d| d.remove_temp::(out_id)); + } + if r.changed() && typed.is_finite() { + *value = typed.round().clamp(lo, hi); + let typing = (r.has_focus() || r.lost_focus()) && ui.ctx().dragged_id().is_none(); + let out = typing && !(lo..=hi).contains(&typed); + ui.ctx().data_mut(|d| d.insert_temp(out_id, out)); + if typing && r.has_focus() { + ui.ctx().data_mut(|d| d.insert_temp(draft_id, (typed, *value))); + } else { + ui.ctx().data_mut(|d| d.remove_temp::<(f32, f32)>(draft_id)); + } + } + if !r.has_focus() { + ui.ctx().data_mut(|d| d.remove_temp::<(f32, f32)>(draft_id)); + } + cam_amount_slider(ui, name, value, lo, hi, tip); + r.lost_focus() && ui.ctx().data_mut(|d| d.remove_temp::(out_id)).unwrap_or(false) +} + +/// The ▾ beside a Content-Aware Move amount: its pop-up slider snaps to whole numbers in `lo..=hi`. +fn cam_amount_slider(ui: &mut egui::Ui, name: &str, value: &mut f32, lo: f32, hi: f32, tip: &str) { + let (rect, resp) = ui.allocate_exact_size(vec2(14.0, 22.0), egui::Sense::click()); + resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, ui.is_enabled(), name)); + let resp = resp.on_hover_text(tl!(tip)); + let popup = egui::Popup::from_toggle_button_response(&resp).close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside); + let open = popup.is_open(); + if resp.hovered() || open { + let t = Tokens::get(ui.ctx()); + ui.painter().rect_filled(rect, t.radius_sm, t.field_border.gamma_multiply(0.6)); + } + crate::widgets::chevron_icon(ui, rect, ui.style().interact(&resp), open); + let parent_layer = resp.layer_id; + popup.show(|ui| { + crate::press_menu::above_parent_ui(parent_layer, ui); + ui.set_min_width(160.0); + let mut v = *value; + let s = crate::widgets::slider(ui, &mut v, lo..=hi, None); + if v.is_finite() { + let snapped = v.round().clamp(lo, hi); + if snapped != *value { + *value = snapped; + } + } + s.widget_info(|| egui::WidgetInfo::slider(ui.is_enabled(), f64::from(*value), name)); + }); +} + +fn open_cam_range_alert(app: &mut PhotocraftApp, message: &str) { + let message = tl!(message).to_owned(); + let shown = + app.ui.dialogs.iter().any(|d| d.kind == crate::state::DialogKind::Error && d.fields.get("message").and_then(|m| m.as_str()) == Some(message.as_str())); + if !shown { + app.ui.open_dialog(crate::state::DialogKind::Error, json!({ "message": message }).as_object().cloned().unwrap_or_default()); + } +} + +/// Content-Aware Move's options (#12193). While the Transform On Drop box is up, the controls are +/// greyed and Cancel then Commit sit at the right end. +fn content_aware_move_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) { + let live = crate::cam_transform::active(app); + ui.add_enabled_ui(!live, |ui| { + crate::panels::selection_mode_buttons(&mut app.ui.selection_mode, ui); + crate::widgets::vline(ui, 22.0); + opt(ui, tl!("Mode:")); + let modes = [("move".to_string(), tl!("Move")), ("extend".to_string(), tl!("Extend"))]; + crate::widgets::dropdown(ui, "cam-mode", tl!("Mode"), &mut app.ui.tool_options.cam_mode, &modes, 90.0); + if let Some(mode) = ui.ctx().read_response(ui.make_persistent_id(egui::IdSalt::new("cam-mode"))) { + mode.on_hover_text(tl!("Choose a remix mode")); + } + opt(ui, tl!("Structure:")); + if cam_integer_popup(ui, "cam-structure", "Structure", &mut app.ui.tool_options.cam_structure, 1.0, 7.0, STRUCTURE_TIP) { + open_cam_range_alert(app, STRUCTURE_RANGE_ALERT); + } + opt(ui, tl!("Color:")); + if cam_integer_popup(ui, "cam-color", "Color", &mut app.ui.tool_options.cam_color, 0.0, 10.0, COLOR_TIP) { + open_cam_range_alert(app, COLOR_RANGE_ALERT); + } + crate::widgets::checkbox(ui, &mut app.ui.tool_options.sample_all.content_aware_move, tl!("Sample All Layers")) + .on_hover_text(tl!("Enable to remix all layers")); + crate::widgets::checkbox(ui, &mut app.ui.tool_options.cam_transform_on_drop, tl!("Transform On Drop")) + .on_hover_text(tl!("Allows rotation and scaling of selection")); + }); + crate::widgets::vline(ui, 22.0); + if live { + // right_to_left places the first widget at the right, so Commit is the rightmost and + // Cancel sits just to its left. + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + let tip = crate::i18n::fmt(tl!("Commit transform ({key})"), &[("key", &crate::shortcuts::pretty("Enter"))]); + let commit = crate::icons::button(ui, "check", 26.0, false, &tip); + commit.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Commit transform")); + if commit.clicked() { + crate::cam_transform::commit(app); + } + let cancel = crate::icons::button(ui, "ban", 26.0, false, tl!("Cancel transform (Esc)")); + cancel.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Cancel transform")); + if cancel.clicked() { + crate::cam_transform::cancel(app); + } + }); + } else { + opt(ui, tl!("Lasso around an area, then drag the selection")); + } +} + /// Options bar for the retouching and smart-selection tools. Returns false for other tools. pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bool { if !tool.is_brushlike() && !matches!(tool, Tool::QuickSelection | Tool::ObjectSelection | Tool::Patch | Tool::ContentAwareMove | Tool::RedEye) @@ -543,6 +665,10 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bo { return false; } + if tool == Tool::ContentAwareMove { + content_aware_move_bar(app, ui); + return true; + } let composite = crate::canvas::paint_target(app).as_str() == Some("pixels"); let o = &mut app.ui.tool_options; match tool { @@ -603,37 +729,6 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bo crate::widgets::vline(ui, 22.0); opt(ui, tl!("Lasso around an area, then drag the selection")); } - Tool::ContentAwareMove => { - // The lasso's selection mode leads, as on the Patch tool's bar (#11024). - crate::panels::selection_mode_buttons(&mut app.ui.selection_mode, ui); - crate::widgets::vline(ui, 22.0); - opt(ui, tl!("Mode:")); - let modes = [("move".to_string(), tl!("Move")), ("extend".to_string(), tl!("Extend"))]; - crate::widgets::dropdown(ui, "cam-mode", tl!("Mode"), &mut o.cam_mode, &modes, 90.0); - opt(ui, tl!("Structure:")); - crate::widgets::value_field(ui, &mut o.cam_structure, 1.0..=7.0, "", 40.0); - opt(ui, tl!("Color:")); - crate::widgets::value_field(ui, &mut o.cam_color, 0.0..=10.0, "", 40.0); - crate::widgets::checkbox(ui, &mut o.sample_all.content_aware_move, tl!("Sample All Layers")); - crate::widgets::checkbox(ui, &mut o.cam_transform_on_drop, tl!("Transform On Drop")); - crate::widgets::vline(ui, 22.0); - if crate::cam_transform::active(app) { - // The box on the dropped patch: ✓ computes the move, ⊘ drops it (as ↩ / Esc). - let tip = crate::i18n::fmt(tl!("Commit transform ({key})"), &[("key", &crate::shortcuts::pretty("Enter"))]); - let commit = crate::icons::button(ui, "check", 26.0, false, &tip); - commit.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Commit transform")); - if commit.clicked() { - crate::cam_transform::commit(app); - } - let cancel = crate::icons::button(ui, "ban", 26.0, false, tl!("Cancel transform (Esc)")); - cancel.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, "Cancel transform")); - if cancel.clicked() { - crate::cam_transform::cancel(app); - } - } else { - opt(ui, tl!("Lasso around an area, then drag the selection")); - } - } Tool::PatternStamp => { pattern_stamp_options(app, ui); } @@ -811,3 +906,7 @@ fn pattern_stamp_options(app: &mut PhotocraftApp, ui: &mut egui::Ui) { #[cfg(test)] mod tests; + +#[cfg(test)] +#[path = "../cam_options_bar_tests.rs"] +mod cam_options_bar_tests; From e9cac335b439fe8eb307838c26471f7fbbfe4f91 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 20:25:11 +0100 Subject: [PATCH 38/41] Regenerate the parity checklist and scorecard after merging main into #10569 Co-Authored-By: hectorviov Co-Authored-By: Claude Opus 5.5 --- docs/parity-checklist.md | 4 ++-- docs/scorecard.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 6fe46dfbfa..8b878685c7 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -2,11 +2,11 @@ Generated by `cargo xtask parity` from `crates/ui-egui/src/menu_catalog.rs` (Photoshop's menu tree) and the live command registry. Do not edit by hand. -**663 of 663 menu items live (100.0%).** +**664 of 664 menu items live (100.0%).** | Menu | Live | Total | % | |---|---:|---:|---:| -| File | 52 | 52 | 100% | +| File | 53 | 53 | 100% | | Edit | 75 | 75 | 100% | | Image | 61 | 61 | 100% | | Layer | 163 | 163 | 100% | diff --git a/docs/scorecard.md b/docs/scorecard.md index b5d4e381b2..639cba94ae 100644 --- a/docs/scorecard.md +++ b/docs/scorecard.md @@ -11,7 +11,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js | [Tools](#tools) | 36 | 9 | 0 | | | [Workspace and UI](#workspace-and-ui) | 15 | 6 | 2 | settings that do nothing: 10 of 199 (target 0) | | [Type](#type) | 5 | 5 | 0 | | -| [Automation](#automation) | 5 | 4 | 2 | 663 of 663 menu items live (100.0%) | +| [Automation](#automation) | 5 | 4 | 2 | 664 of 664 menu items live (100.0%) | | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present | | [Distribution](#distribution) | 5 | 5 | 1 | | | [Open bugs](#open-bugs) | 31 | 1 | 0 | | @@ -256,7 +256,7 @@ Unread: `general.color_picker`, `workspace.auto_show_hidden_panels`, `workspace. ## Automation -Menu wiring (`docs/parity-checklist.md`): 663 of 663 menu items live (100.0%). This counts dispatch, not behaviour. +Menu wiring (`docs/parity-checklist.md`): 664 of 664 menu items live (100.0%). This counts dispatch, not behaviour. | Id | Target | Status | Issue | Note | |---|---|---|---|---| From bf7d942f92c161fdf5473f8c8afa46fb59fd61c5 Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 8 Nov 2026 23:42:18 +0100 Subject: [PATCH 39/41] Address CodeRabbit review: Angle alert survives the window losing focus Response::has_focus() is false while the window is in the background, so the guard dropped a pending out-of-range entry; check the widget's own focus instead. Co-Authored-By: Claude Opus 5.5 --- .../src/background_eraser_bar_angle_tests.rs | 21 +++++++++++++++++++ crates/ui-egui/src/tools/eraser_ui.rs | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs index 4984d4b15f..2d897fe01f 100644 --- a/crates/ui-egui/src/background_eraser_bar_angle_tests.rs +++ b/crates/ui-egui/src/background_eraser_bar_angle_tests.rs @@ -96,6 +96,27 @@ fn an_entry_left_by_a_tool_switch_does_not_alert_later() { assert!(alerts(&h).is_empty(), "nothing typed this time: {:?}", alerts(&h)); } +#[test] +fn an_entry_kept_while_the_window_is_in_the_background_still_alerts() { + let mut h = bar(Tool::BackgroundEraser); + angle_field(&h).expect("the Angle field").click(); + h.run_steps(1); + h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A); + h.event(egui::Event::Text("400".into())); + h.run_steps(1); + // Another window takes the focus mid-entry, then this one gets it back. + h.input_mut().focused = false; + h.event(egui::Event::WindowFocused(false)); + h.run_steps(3); + h.input_mut().focused = true; + h.event(egui::Event::WindowFocused(true)); + h.run_steps(1); + h.key_press(egui::Key::Enter); + h.run_steps(2); + assert_eq!(h.state().session.tools.brush.angle, 180.0); + assert_eq!(alerts(&h), vec![crate::eraser_ui::ANGLE_RANGE_MESSAGE.to_string()], "typed before the switch, so it alerts"); +} + #[test] fn pressure_for_size_follows_protect_foreground_color_off_by_default() { let mut h = bar(Tool::BackgroundEraser); diff --git a/crates/ui-egui/src/tools/eraser_ui.rs b/crates/ui-egui/src/tools/eraser_ui.rs index df51b2ce92..057a1442e3 100644 --- a/crates/ui-egui/src/tools/eraser_ui.rs +++ b/crates/ui-egui/src/tools/eraser_ui.rs @@ -110,7 +110,9 @@ fn angle_field(ui: &mut egui::Ui, b: &mut photocraft_engine::BrushSettings) -> b let out_of_range = r.id.with("bg-eraser-angle-out-of-range"); // The flag lives only while an entry is being typed: drawn without the keyboard, the field // drops it, so an entry the tool switch cut off (never committed) can't alert on a later one. - if !r.has_focus() && !r.lost_focus() { + // The widget's own focus, not `has_focus()`: that is false while the window is in the + // background, and switching away mid-entry must keep the alert for the commit. + if !ui.memory(|m| m.has_focus(r.id)) && !r.lost_focus() { ui.data_mut(|d| d.remove_temp::(out_of_range)); } if r.changed() && a.is_finite() { From 2ea37fc84988addc17f495d11d11669cdf5c145a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 8 Nov 2026 19:44:03 -0800 Subject: [PATCH 40/41] Updates: take craft-update from craft-libs main at 1b34eba41 --- Cargo.lock | 26 +++++++++++++------------- Cargo.toml | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c9edda845..6d7c72789f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1406,17 +1406,17 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1439,7 +1439,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "thiserror 2.0.21", ] @@ -1457,7 +1457,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "bytemuck", "hayro", @@ -1469,7 +1469,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "craft-winprint-gdi", "log", @@ -1483,7 +1483,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1504,7 +1504,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "chrono", "dunce", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "bytemuck", "hayro-interpret", @@ -2994,7 +2994,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3036,7 +3036,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/dotCooCoo/craft-libs?rev=c7c84230631cbc01ee928f0a0e0d838b1ed612ae#c7c84230631cbc01ee928f0a0e0d838b1ed612ae" +source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" dependencies = [ "flate2", "hayro-ccitt", @@ -9473,7 +9473,7 @@ dependencies = [ [[package]] name = "winprint" version = "0.2.1" -source = "git+https://github.com/storytold/winprint.rs?rev=64e7afd4d1483512385012c340ecaaaf0f3beb7f#64e7afd4d1483512385012c340ecaaaf0f3beb7f" +source = "git+https://github.com/storytold/winprint.rs?rev=51934db382f225454cf152a8657eb03789be63c4#51934db382f225454cf152a8657eb03789be63c4" dependencies = [ "flate2", "fmt-derive", diff --git a/Cargo.toml b/Cargo.toml index e4804e565d..cd2f69a665 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-ui = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["serde"] } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d", features = ["serde"] } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } @@ -39,13 +39,13 @@ photocraft-tablet = { path = "crates/tablet" } photocraft-ipp = { path = "crates/ipp" } # external -craft-print = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } -craft-pdf = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["raster"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } -craft-jpeg = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d", features = ["raster"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "b8f7d93b00dfb8f172938f3d2d796ae62dcfe123" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/dotCooCoo/craft-libs", version = "=0.1.0", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae", features = ["egui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "1b34eba41e62138fc2438d2734523b302840b45d", features = ["egui"] } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -205,7 +205,7 @@ egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6d518fc7 egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } # craft-pdf's vendored Hayro trees: consumers patch the same craft-libs revision (crates/pdf README). -hayro = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } -hayro-syntax = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } -hayro-interpret = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } -hayro-jbig2 = { git = "https://github.com/dotCooCoo/craft-libs", rev = "c7c84230631cbc01ee928f0a0e0d838b1ed612ae" } +hayro = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } From d06ad7327149b6cc08df58c7b9ab10258f86828d Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Mon, 9 Nov 2026 08:30:33 +0100 Subject: [PATCH 41/41] Naming: use RAW Develop for PhotoCraft's raw-processing feature (#12403) Related to #5310. Display labels only; command ids (filter.cameraRaw, edit.preferences.rawDefaults), preference keys, serialized settings, PSD/action/XMP Adobe Camera Raw identifiers and .atn step names are unchanged. - Camera Raw / Camera Raw Filter / Camera Raw Defaults -> RAW Develop / RAW Develop Filter / RAW Defaults in menus, preferences, filter names, diagnostics and all 34 catalogs. - Saved Photoshop actions keep the "Camera Raw Filter" step name, so .atn files round-trip byte for byte (test extended). - "Camera Raw" stays a command-search keyword. - Removes dormant Adobe/Photoshop-branded catalog rows; display-name guard tests. --- apps/photocraft/src/services.rs | 2 +- crates/engine/src/cmd.rs | 11 +- crates/engine/src/cmd/atn_cmds/events.rs | 3 + crates/engine/src/cmd/atn_cmds/tests.rs | 9 +- crates/engine/src/cmd/lens_cmds.rs | 16 +- crates/engine/src/color_channels.rs | 2 +- crates/engine/src/prefs/cmds.rs | 2 +- crates/engine/src/prefs/validate.rs | 2 +- crates/engine/src/tests.rs | 21 ++ crates/gpu/src/camera_raw.rs | 10 +- crates/io/src/raw.rs | 2 +- .../src/dialogs/camera_raw_detail_ui.rs | 10 +- crates/ui-egui/src/dialogs/camera_raw_gpu.rs | 16 +- .../src/dialogs/camera_raw_preview_ui.rs | 12 +- crates/ui-egui/src/dialogs/camera_raw_ui.rs | 4 +- .../src/dialogs/camera_raw_ui/controls.rs | 8 +- .../src/dialogs/camera_raw_ui/convert.rs | 4 +- .../src/dialogs/camera_raw_ui/filmstrip.rs | 2 +- .../dialogs/camera_raw_ui/identity_tests.rs | 2 +- .../ui-egui/src/dialogs/camera_raw_ui/menu.rs | 20 +- .../ui-egui/src/dialogs/camera_raw_ui/open.rs | 4 +- .../src/dialogs/camera_raw_ui/sidecar.rs | 12 +- .../src/dialogs/camera_raw_ui/tests.rs | 12 +- crates/ui-egui/src/i18n/ar.tsv | 22 +- crates/ui-egui/src/i18n/az.tsv | 37 ++- crates/ui-egui/src/i18n/bs.tsv | 39 ++-- crates/ui-egui/src/i18n/cs.tsv | 29 ++- crates/ui-egui/src/i18n/da.tsv | 43 ++-- crates/ui-egui/src/i18n/de.tsv | 23 +- crates/ui-egui/src/i18n/el.tsv | 24 +- crates/ui-egui/src/i18n/es.tsv | 30 ++- crates/ui-egui/src/i18n/fi.tsv | 43 ++-- crates/ui-egui/src/i18n/fr.tsv | 30 +-- crates/ui-egui/src/i18n/he.tsv | 27 ++- crates/ui-egui/src/i18n/hi.tsv | 27 ++- crates/ui-egui/src/i18n/hu.tsv | 28 +-- crates/ui-egui/src/i18n/id.tsv | 28 +-- crates/ui-egui/src/i18n/it.tsv | 34 ++- crates/ui-egui/src/i18n/ja.tsv | 28 +-- crates/ui-egui/src/i18n/ka.tsv | 37 ++- crates/ui-egui/src/i18n/ko.tsv | 23 +- crates/ui-egui/src/i18n/nb.tsv | 43 ++-- crates/ui-egui/src/i18n/nl.tsv | 26 +-- crates/ui-egui/src/i18n/pl.tsv | 26 +-- crates/ui-egui/src/i18n/pt-br.tsv | 26 +-- crates/ui-egui/src/i18n/ro.tsv | 31 ++- crates/ui-egui/src/i18n/ru.tsv | 34 ++- crates/ui-egui/src/i18n/sr.tsv | 42 ++-- crates/ui-egui/src/i18n/sv.tsv | 43 ++-- crates/ui-egui/src/i18n/ta.tsv | 27 ++- crates/ui-egui/src/i18n/tests.rs | 15 +- crates/ui-egui/src/i18n/th.tsv | 43 ++-- crates/ui-egui/src/i18n/tr.tsv | 26 +-- crates/ui-egui/src/i18n/uk.tsv | 30 ++- crates/ui-egui/src/i18n/ur.tsv | 27 ++- crates/ui-egui/src/i18n/vi.tsv | 37 ++- crates/ui-egui/src/i18n/zh-hans.tsv | 26 ++- crates/ui-egui/src/i18n/zh-hant.tsv | 25 +- crates/ui-egui/src/menu_catalog.rs | 4 +- .../ui-egui/src/preferences_submenu_tests.rs | 8 +- crates/ui-egui/src/smart_filter_rows_tests.rs | 6 +- crates/ui-egui/tests/display_names.rs | 220 ++++++++++++++++++ docs/feature-names.md | 17 ++ 63 files changed, 868 insertions(+), 652 deletions(-) create mode 100644 crates/ui-egui/tests/display_names.rs create mode 100644 docs/feature-names.md diff --git a/apps/photocraft/src/services.rs b/apps/photocraft/src/services.rs index 6900d71afd..7c0fbf763e 100644 --- a/apps/photocraft/src/services.rs +++ b/apps/photocraft/src/services.rs @@ -68,7 +68,7 @@ const OPEN_FILTERS: &[(&str, &[&str])] = &[ ("DPX and Cineon", &["dpx", "cin"]), ("Amiga IFF", &["iff", "lbm", "ilbm"]), ("DICOM", &["dcm", "dicom", "dc3"]), - ("Camera Raw", &["dng", "cr2", "cr3", "nef", "nrw", "arw", "pef", "orf", "rw2", "raf"]), + ("RAW images", &["dng", "cr2", "cr3", "nef", "nrw", "arw", "pef", "orf", "rw2", "raf"]), ("Brushes", &["abr"]), ("Gradients", &["grd"]), ("Styles", &["asl"]), diff --git a/crates/engine/src/cmd.rs b/crates/engine/src/cmd.rs index 01218315a4..42567c08dd 100644 --- a/crates/engine/src/cmd.rs +++ b/crates/engine/src/cmd.rs @@ -208,9 +208,14 @@ pub fn list_entry(s: &Session, c: &CommandSpec, reason: Option) -> Value /// Other names a command is looked for by, beyond its id and label: the Photoshop tools and /// options it stands for (#5060). `select.rect` is also the Elliptical and Single Row/Column -/// Marquee, which an agent searches for as "ellipse" or "marquee". -pub(crate) const SEARCH_KEYWORDS: &[(&str, &str)] = - &[("select.rect", "Rectangular Marquee, Elliptical Marquee (\"ellipse\":true), ellipse, oval, circle, Single Row/Column Marquee (\"line\")")]; +/// Marquee, which an agent searches for as "ellipse" or "marquee". The RAW Develop filter and +/// RAW Defaults keep Photoshop's "Camera Raw" name as a search alias only: the menus and windows +/// say "RAW Develop" (#12403). +pub(crate) const SEARCH_KEYWORDS: &[(&str, &str)] = &[ + ("select.rect", "Rectangular Marquee, Elliptical Marquee (\"ellipse\":true), ellipse, oval, circle, Single Row/Column Marquee (\"line\")"), + ("filter.cameraRaw", "Camera Raw Filter"), + ("edit.preferences.rawDefaults", "Camera Raw Defaults"), +]; /// [`SEARCH_KEYWORDS`] of command `id`, if it has any. pub fn search_keywords(id: &str) -> Option<&'static str> { diff --git a/crates/engine/src/cmd/atn_cmds/events.rs b/crates/engine/src/cmd/atn_cmds/events.rs index 162bf22f8a..2736c87b94 100644 --- a/crates/engine/src/cmd/atn_cmds/events.rs +++ b/crates/engine/src/cmd/atn_cmds/events.rs @@ -616,6 +616,9 @@ pub(super) const EVENTS: &[Event] = &[ Event { code: "GEfc", name: "filterGallery", label: "Filter Gallery", ids: GALLERY_IDS, from: gallery_from, to: gallery_to }, // What Photoshop needs in a written step (process version, the full settings set) is // unverified, so only an imported step saves back, as its recorded descriptor while unedited. + // The label is interchange data, not a display name: Save Actions writes it into the step's + // dictionary (convert.rs), so it stays Photoshop's wording and a loaded step round-trips. The + // menu item and window title come from `lens_cmds` and read "RAW Develop Filter". Event { code: "", name: "Adobe Camera Raw Filter", label: "Camera Raw Filter", ids: &[crate::lens_cmds::RAW], from: camera_raw_from, to: camera_raw_to }, // Video, Other, Average and matting (#10607). Event { diff --git a/crates/engine/src/cmd/atn_cmds/tests.rs b/crates/engine/src/cmd/atn_cmds/tests.rs index 27b6f6500b..ab152eddac 100644 --- a/crates/engine/src/cmd/atn_cmds/tests.rs +++ b/crates/engine/src/cmd/atn_cmds/tests.rs @@ -3832,13 +3832,16 @@ fn loaded_camera_raw_filter_steps_save_back_unchanged() { assert_eq!(s.actions.list[0].steps[0].0, "filter.cameraRaw"); let saved_step = |r: &Value| { let saved = atn::parse(&photocraft_paint::tile::b64_decode(r["data"].as_str().unwrap()).unwrap()).unwrap(); - saved.actions[0].items.first().map(|i| (i.event.clone(), i.descriptor.clone())) + saved.actions[0].items.first().map(|i| (i.event.clone(), i.dictionary.clone(), i.descriptor.clone())) }; - // Strict save, and the Actions panel's save (which skips what can't be written). + // Strict save, and the Actions panel's save (which skips what can't be written). The step's + // dictionary is stored action data, so it keeps Photoshop's wording and not the menu label + // ("RAW Develop Filter"): a loaded step reads the same in Photoshop's Actions panel. for skip in [false, true] { let r = s.execute("actions.save", json!({"action": "A", "skipUnsupported": skip})).unwrap(); assert_eq!(r["skipped"], json!([]), "{r}"); - assert_eq!(saved_step(&r), Some((AtnEvent::name("Adobe Camera Raw Filter"), Some(recorded.clone())))); + let expected = (AtnEvent::name("Adobe Camera Raw Filter"), b"Camera Raw Filter".to_vec(), Some(recorded.clone())); + assert_eq!(saved_step(&r), Some(expected)); } // It plays. s.execute("file.new", json!({"width": 16, "height": 12})).unwrap(); diff --git a/crates/engine/src/cmd/lens_cmds.rs b/crates/engine/src/cmd/lens_cmds.rs index 1192281744..82376d65a6 100644 --- a/crates/engine/src/cmd/lens_cmds.rs +++ b/crates/engine/src/cmd/lens_cmds.rs @@ -276,7 +276,7 @@ fn raw_enabled(s: &Session) -> std::result::Result<(), String> { let d = s.active().ok_or("no document open")?; match d.doc.mode { ColorMode::Rgb | ColorMode::Grayscale => Ok(()), - m => Err(format!("Camera Raw Filter needs an RGB or Grayscale document (this one is {m:?})")), + m => Err(format!("RAW Develop Filter needs an RGB or Grayscale document (this one is {m:?})")), } } @@ -412,12 +412,13 @@ fn camera_raw_cmd(s: &mut Session, p: &Value) -> Result { if raw_pixels(area).is_none() { return Err(bad( RAW, - format!("the image is too large for Camera Raw ({}×{} px; max {} megapixels)", area.width(), area.height(), MAX_RAW_PIXELS / 1_000_000), + format!("the image is too large for RAW Develop ({}×{} px; max {} megapixels)", area.width(), area.height(), MAX_RAW_PIXELS / 1_000_000), )); } } let t0 = Stopwatch::start(); - let id = run_filter(s, RAW, "Camera Raw Filter", p, p.clone(), false, &|surf, canvas| camera_raw_surface(surf, canvas.union(&surf.content_bounds()), &cr))?; + let id = + run_filter(s, RAW, "RAW Develop Filter", p, p.clone(), false, &|surf, canvas| camera_raw_surface(surf, canvas.union(&surf.content_bounds()), &cr))?; Ok(json!({"layer": id.0, "identity": cr.is_identity(), "ms": t0.ms()})) } @@ -469,7 +470,7 @@ pub fn specs() -> Vec { }, CommandSpec { id: RAW, - label: "Camera Raw Filter…", + label: "RAW Develop Filter…", menu: &["Filter"], shortcut: Some("Cmd+Shift+A"), params: r##"{"temperature":-100..100=0,"tint":-100..100=0,"exposure":-5..5=0,"contrast":-100..100=0,"highlights":-100..100=0,"shadows":-100..100=0,"whites":-100..100=0,"blacks":-100..100=0,"texture":-100..100=0,"clarity":-100..100=0,"dehaze":-100..100=0,"vibrance":-100..100=0,"saturation":-100..100=0,"curveHighlights":-100..100=0,"curveLights":-100..100=0,"curveDarks":-100..100=0,"curveShadows":-100..100=0,"curveSplits":[25,50,75],"pointCurve":[[in,out]],"pointCurveRed":[[in,out]],"pointCurveGreen":[[in,out]],"pointCurveBlue":[[in,out]],"hslHue":[8],"hslSat":[8],"hslLum":[8],"gradeShadows":{"hue":deg,"sat":0..100,"lum":-100..100},"gradeMidtones":{},"gradeHighlights":{},"gradeGlobal":{},"gradeBlending":0..100=50,"gradeBalance":-100..100=0,"shadowTint":-100..100=0,"calibrationHue":[red,green,blue] -100..100,"calibrationSat":[red,green,blue] -100..100 (the Calibration panel: Shadows tint and the primaries' hue and saturation),"sharpenAmount":0..150=0,"sharpenRadius":0.5..3=1,"sharpenDetail":0..100=25,"sharpenMasking":0..100=0,"noiseLuminance":0..100=0,"noiseLuminanceDetail":0..100=50,"noiseColor":0..100=0,"noiseColorDetail":0..100=50,"grainAmount":0..100=0,"grainSize":0..100=25,"grainRoughness":0..100=50,"vignetteAmount":-100..100=0,"vignetteMidpoint":0..100=50,"vignetteRoundness":-100..100=0,"vignetteFeather":0..100=50,"vignetteHighlights":0..100=0,"vignetteStyle":"highlightPriority|colorPriority|paintOverlay","seed":u32=0}"##, @@ -492,6 +493,13 @@ pub fn specs() -> Vec { #[cfg(test)] mod tests { + + #[test] + fn raw_develop_filter_keeps_its_automation_id() { + let command = super::specs().into_iter().find(|command| command.id == "filter.cameraRaw").expect("existing RAW command"); + assert_eq!(command.label, "RAW Develop Filter…"); + } + use super::*; fn session(depth: u32) -> Session { diff --git a/crates/engine/src/color_channels.rs b/crates/engine/src/color_channels.rs index c19c7e389c..97a1c90a26 100644 --- a/crates/engine/src/color_channels.rs +++ b/crates/engine/src/color_channels.rs @@ -123,7 +123,7 @@ pub(crate) fn refusal(s: &Session, id: &str, p: &Value) -> Option { return Some("Move and transforms on several colour channels are not implemented yet".into()); } if id == "filter.cameraRaw" { - return Some("Camera Raw requires the composite or one colour channel".into()); + return Some("RAW Develop requires the composite or one colour channel".into()); } None } diff --git a/crates/engine/src/prefs/cmds.rs b/crates/engine/src/prefs/cmds.rs index fa695e1e92..0d34b8fbcd 100644 --- a/crates/engine/src/prefs/cmds.rs +++ b/crates/engine/src/prefs/cmds.rs @@ -180,7 +180,7 @@ pub fn specs() -> Vec { section!("edit.preferences.plugIns", "Plugins…"), section!("edit.preferences.type", "Type…"), section!("edit.preferences.enhancedControls", "Enhanced Controls…"), - section!("edit.preferences.rawDefaults", "Camera Raw…"), + section!("edit.preferences.rawDefaults", "RAW Defaults…"), section!("edit.preferences.integrations", "Integrations…"), spec!( "edit.keyboardShortcuts", diff --git a/crates/engine/src/prefs/validate.rs b/crates/engine/src/prefs/validate.rs index f9c0b9f805..ccbf2cd6ba 100644 --- a/crates/engine/src/prefs/validate.rs +++ b/crates/engine/src/prefs/validate.rs @@ -24,7 +24,7 @@ pub const SECTIONS: [(&str, &str); 18] = [ ("plugIns", "Plugins"), ("type", "Type"), ("enhancedControls", "Enhanced Controls"), - ("rawDefaults", "Camera Raw Defaults"), + ("rawDefaults", "RAW Defaults"), ("integrations", "Integrations"), ]; diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 8f82376a3a..25df001fea 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -966,6 +966,27 @@ fn command_list_filter_finds_the_marquees_by_keyword() { assert!(found("no command is called this").is_empty()); } +/// The rename to "RAW Develop" is display only: the filter and RAW Defaults are still found by +/// Photoshop's "Camera Raw" name, which their keywords carry (#12403). +#[test] +fn command_list_filter_finds_the_raw_commands_by_their_photoshop_name() { + let mut s = Session::new(); + let list = s.execute("command.list", json!({})).unwrap(); + let rows = list.as_array().unwrap(); + let found = |needle: &str| -> Vec { + rows.iter().filter(|c| crate::commands::list_entry_matches(c, needle)).map(|c| c["id"].as_str().unwrap().to_string()).collect() + }; + for needle in ["camera raw", "Camera Raw", "CAMERA RAW"] { + let ids = found(needle); + assert!(ids.contains(&"filter.cameraRaw".to_string()), "{needle}: {ids:?}"); + assert!(ids.contains(&"edit.preferences.rawDefaults".to_string()), "{needle}: {ids:?}"); + } + // What the menus show is the new name, and the keywords are not a label. + let label = |id: &str| rows.iter().find(|c| c["id"] == id).unwrap()["label"].as_str().unwrap().to_string(); + assert_eq!(label("filter.cameraRaw"), "RAW Develop Filter…"); + assert_eq!(label("edit.preferences.rawDefaults"), "RAW Defaults…"); +} + /// Every keyword entry names a real command, so a renamed id can't leave one behind. #[test] fn search_keywords_name_real_commands() { diff --git a/crates/gpu/src/camera_raw.rs b/crates/gpu/src/camera_raw.rs index 3f1833a54b..14f8a17e6c 100644 --- a/crates/gpu/src/camera_raw.rs +++ b/crates/gpu/src/camera_raw.rs @@ -75,7 +75,7 @@ impl CameraRawDevelop { pub fn new(device: &wgpu::Device) -> Result { match crate::first_error(device, || Self::build(device)) { (dev, None) => Ok(dev), - (_, Some(e)) => Err(Unsupported(format!("couldn't build the Camera Raw pipeline: {e}"))), + (_, Some(e)) => Err(Unsupported(format!("couldn't build the RAW Develop pipeline: {e}"))), } } @@ -246,7 +246,7 @@ impl CameraRawDevelop { Some(e) => { // A half-done upload must not be taken for the cached source next time. self.source = None; - Err(Unsupported(format!("GPU Camera Raw develop failed: {e}"))) + Err(Unsupported(format!("GPU RAW Develop failed: {e}"))) } None => result, } @@ -270,7 +270,7 @@ impl CameraRawDevelop { let bytes = u64::from(row) * u64::from(h); let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: Some("pc_camera_raw") }); self.encode(device, queue, &mut encoder, source, key, size, stages)?; - let Some(target) = self.target.as_ref().map(|t| &t.texture) else { return Err(Unsupported("no Camera Raw target".into())) }; + let Some(target) = self.target.as_ref().map(|t| &t.texture) else { return Err(Unsupported("no RAW Develop target".into())) }; let buffer = match self.readback.take() { Some(b) if b.size() == bytes => b, _ => device.create_buffer(&wgpu::BufferDescriptor { @@ -316,10 +316,10 @@ impl CameraRawDevelop { fn check_size(device: &wgpu::Device, source: &[[f32; 4]], [w, h]: [u32; 2]) -> Result<(), Unsupported> { let max = device.limits().max_texture_dimension_2d; if w == 0 || h == 0 || w > max || h > max { - return Err(Unsupported(format!("a {w}×{h} Camera Raw preview doesn't fit the GPU's {max} px textures"))); + return Err(Unsupported(format!("a {w}×{h} RAW Develop preview doesn't fit the GPU's {max} px textures"))); } if source.len() as u64 != u64::from(w) * u64::from(h) { - return Err(Unsupported(format!("{} Camera Raw preview pixels for {w}×{h}", source.len()))); + return Err(Unsupported(format!("{} RAW Develop preview pixels for {w}×{h}", source.len()))); } Ok(()) } diff --git a/crates/io/src/raw.rs b/crates/io/src/raw.rs index a1d1c73067..23d9d5a5ea 100644 --- a/crates/io/src/raw.rs +++ b/crates/io/src/raw.rs @@ -128,7 +128,7 @@ pub fn import_raw_tuned(name: &str, bytes: &[u8], tuning: &RawTuning) -> Result< .filter(|(_, v)| *v != 0.0) .map(|(k, v)| format!(", {k} {v:+.0}")) .collect::(); - let summary = format!("developed in Camera Raw (exposure {:+.2} EV{tone}, {wb}, {} demosaic{cropped})", tuning.exposure, tuning.demosaic.id()); + let summary = format!("developed in RAW Develop (exposure {:+.2} EV{tone}, {wb}, {} demosaic{cropped})", tuning.exposure, tuning.demosaic.id()); Ok((developed_document(name, bytes, format, dev, &summary)?, wb_applied)) } diff --git a/crates/ui-egui/src/dialogs/camera_raw_detail_ui.rs b/crates/ui-egui/src/dialogs/camera_raw_detail_ui.rs index 88747a8dd7..008eaf723a 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_detail_ui.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_detail_ui.rs @@ -75,7 +75,7 @@ impl DetailPreview { let result = match rx.try_recv() { Ok(result) => result, Err(TryRecvError::Empty) => return, - Err(TryRecvError::Disconnected) => Err("Camera Raw detail preview worker stopped".into()), + Err(TryRecvError::Disconnected) => Err("RAW Develop detail preview worker stopped".into()), }; self.pending = None; match result { @@ -104,7 +104,7 @@ impl DetailPreview { // The engine's full-image pipeline needs multiple temporary float buffers. Never start // an unbounded allocation just because a huge sparse document was zoomed into. if self.area.width() as u64 * self.area.height() as u64 > 64_000_000 { - self.error = Some("Full-resolution Camera Raw preview is limited to 64 megapixels; the proxy remains available".into()); + self.error = Some("Full-resolution RAW Develop preview is limited to 64 megapixels; the proxy remains available".into()); self.failed_revision = Some(revision); return; } @@ -124,7 +124,7 @@ impl DetailPreview { let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| develop(&source, raw_curve.as_deref().map(Vec::as_slice), area, ¶ms, &coverage))) .map(|surface| (revision, surface)) - .map_err(|_| "Camera Raw detail preview failed; the proxy remains available".into()); + .map_err(|_| "RAW Develop detail preview failed; the proxy remains available".into()); if !cancel.load(Ordering::Relaxed) { let _ = tx.send(result); ctx.request_repaint(); @@ -141,7 +141,7 @@ impl DetailPreview { }) { Ok(_) => self.pending = Some((revision, rx)), Err(e) => { - self.error = Some(format!("Cannot start Camera Raw preview: {e}")); + self.error = Some(format!("Cannot start RAW Develop preview: {e}")); self.failed_revision = Some(revision); } } @@ -152,7 +152,7 @@ impl DetailPreview { // instead of blocking its UI with the full-image engine pipeline. drop(work); drop(rx); - self.error = Some("Full-resolution filtered preview requires a native Camera Raw worker; the web preview keeps the proxy".into()); + self.error = Some("Full-resolution filtered preview requires a native RAW Develop worker; the web preview keeps the proxy".into()); self.failed_revision = Some(revision); } } diff --git a/crates/ui-egui/src/dialogs/camera_raw_gpu.rs b/crates/ui-egui/src/dialogs/camera_raw_gpu.rs index 5e9f8719fa..f4545a5bb1 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_gpu.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_gpu.rs @@ -32,11 +32,11 @@ impl Pass { return false; } if adapter.get_info().device_type == wgpu::DeviceType::Cpu { - log::info!("Camera Raw develops on the CPU: software graphics adapter"); + log::info!("RAW Develop develops on the CPU: software graphics adapter"); return false; } if !CameraRawDevelop::supported(adapter) { - log::info!("Camera Raw develops on the CPU: the adapter can't render Rgba32Float"); + log::info!("RAW Develop develops on the CPU: the adapter can't render Rgba32Float"); return false; } true @@ -53,7 +53,7 @@ impl Pass { let (on, out) = (device.clone(), slot.clone()); let spawned = std::thread::Builder::new().name("camera-raw-pipeline".into()).spawn(move || { let pass = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| Self::build_on(&on))).unwrap_or_else(|_| { - log::warn!("building the Camera Raw pipeline panicked; Camera Raw develops on the CPU"); + log::warn!("building the RAW Develop pipeline panicked; RAW Develop develops on the CPU"); None }); let _ = out.set(pass); @@ -70,7 +70,7 @@ impl Pass { match CameraRawDevelop::new(device) { Ok(pass) => Some(Pass(Arc::new(Mutex::new(pass)))), Err(e) => { - log::warn!("{e}; Camera Raw develops on the CPU"); + log::warn!("{e}; RAW Develop develops on the CPU"); None } } @@ -140,7 +140,7 @@ impl CameraRawGpu { match pass.develop(&self.device, &self.queue, Some(&self.health), px, key, size, &stages) { Ok(out) => Some(out), Err(e) => { - log::warn!("{}; Camera Raw develops on the CPU", e.0); + log::warn!("{}; RAW Develop develops on the CPU", e.0); self.failed.store(true, Ordering::Relaxed); None } @@ -215,7 +215,7 @@ mod tests { let _gpu = photocraft_testkit::gpu_lock(); let Some((mut app, ctx)) = gpu_app(8) else { return }; let canvas = app.gpu.clone().expect("GPU canvas"); - assert!(!canvas.camera_raw_started(), "no Camera Raw pipeline at launch (#6419)"); + assert!(!canvas.camera_raw_started(), "no RAW Develop pipeline at launch (#6419)"); crate::camera_raw_ui::open(&mut app, &ctx).unwrap(); assert!(canvas.camera_raw_started(), "built (or refused) from the first open"); assert_eq!(app.camera_raw.as_ref().map(|d| d.develop_backend), Some("cpu"), "the first frame doesn't wait for the pipeline"); @@ -233,7 +233,7 @@ mod tests { force_pass(&app); crate::camera_raw_ui::open(&mut app, &ctx).unwrap(); if app.camera_raw.as_ref().is_some_and(|d| d.gpu.is_none()) { - eprintln!("skipping: the device can't run the Camera Raw pass"); + eprintln!("skipping: the device can't run the RAW Develop pass"); return; } let per_pixel = CameraRaw { @@ -272,7 +272,7 @@ mod tests { force_pass(&app); crate::camera_raw_ui::open(&mut app, &ctx).unwrap(); if app.camera_raw.as_ref().is_some_and(|d| d.gpu.is_none()) { - eprintln!("skipping: the device can't run the Camera Raw pass"); + eprintln!("skipping: the device can't run the RAW Develop pass"); return; } let (backend, _, _) = developed(&mut app, &ctx, CameraRaw { exposure: 0.5, ..Default::default() }); diff --git a/crates/ui-egui/src/dialogs/camera_raw_preview_ui.rs b/crates/ui-egui/src/dialogs/camera_raw_preview_ui.rs index dff92fd50e..91242a13a0 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_preview_ui.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_preview_ui.rs @@ -56,7 +56,7 @@ impl CameraRawPreviewState { /// Validate with the rest of the Camera Raw request before changing anything. pub(crate) fn prepare(current: CameraRawPreviewState, value: &Value) -> Result { - let obj = value.as_object().ok_or("Camera Raw view must be an object")?; + let obj = value.as_object().ok_or("RAW Develop view must be an object")?; let mut next = current; for (key, value) in obj { match key.as_str() { @@ -65,22 +65,22 @@ pub(crate) fn prepare(current: CameraRawPreviewState, value: &Value) -> Result { - let a = value.as_array().filter(|a| a.len() == 2).ok_or("Camera Raw center must be [u,v]")?; + let a = value.as_array().filter(|a| a.len() == 2).ok_or("RAW Develop center must be [u,v]")?; let coordinate = |i| { a.get(i) .and_then(Value::as_f64) .filter(|v| v.is_finite() && (0.0..=1.0).contains(v)) .map(|v| v as f32) - .ok_or("Camera Raw center must be finite coordinates in 0–1") + .ok_or("RAW Develop center must be finite coordinates in 0–1") }; next.center = [coordinate(0)?, coordinate(1)?]; } - "hand" => next.hand = value.as_bool().ok_or("Camera Raw hand must be a boolean")?, - _ => return Err(format!("unknown Camera Raw view property {key}")), + "hand" => next.hand = value.as_bool().ok_or("RAW Develop hand must be a boolean")?, + _ => return Err(format!("unknown RAW Develop view property {key}")), } } if obj.get("zoom").and_then(Value::as_str) == Some("fit") { diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui.rs b/crates/ui-egui/src/dialogs/camera_raw_ui.rs index c32240b4cb..3c2f576671 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui.rs @@ -247,7 +247,7 @@ impl CameraRawDialog { let (tx, rx) = std::sync::mpsc::channel::>(); let repaint = ctx.clone(); let spawned = std::thread::Builder::new().name("camera-raw-proxy".into()).spawn(move || { - let frame = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| job.run())).map_err(|_| "Camera Raw preview failed".to_string()); + let frame = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| job.run())).map_err(|_| "RAW Develop preview failed".to_string()); // The dialog may have closed or rendered on its own meanwhile; then nobody listens. if tx.send(frame).is_ok() { repaint.request_repaint(); @@ -273,7 +273,7 @@ impl CameraRawDialog { let frame = match rx.try_recv() { Ok(frame) => frame, Err(std::sync::mpsc::TryRecvError::Empty) => return Ok(()), - Err(std::sync::mpsc::TryRecvError::Disconnected) => Err("Camera Raw preview worker stopped".to_string()), + Err(std::sync::mpsc::TryRecvError::Disconnected) => Err("RAW Develop preview worker stopped".to_string()), }; self.pending = None; self.publish(ctx, frame?); diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/controls.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/controls.rs index d764ad987f..b3a1792c9f 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/controls.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/controls.rs @@ -49,7 +49,7 @@ fn history_keys(d: &mut CameraRawDialog, ctx: &egui::Context) { } pub(super) fn commit(app: &mut PhotocraftApp) -> Result { - let d = app.camera_raw.as_ref().ok_or(tl!("Camera Raw isn't open"))?; + let d = app.camera_raw.as_ref().ok_or(tl!("RAW Develop isn't open"))?; let result = match d.target { Target::NewFilter => { let mut p = d.command_params(); @@ -225,12 +225,12 @@ pub fn show(app: &mut PhotocraftApp, ctx: &egui::Context) { } impl CameraRawDialog { - /// "Camera Raw (name)" for the open-time dialog, "Camera Raw Filter (layer)" otherwise. + /// "RAW Develop (name)" for the open-time dialog, "RAW Develop Filter (layer)" otherwise. fn window_title(&self) -> String { if self.target == Target::OpenRaw { - crate::i18n::fmt(tl!("Camera Raw ({name})"), &[("name", &self.layer_name)]) + crate::i18n::fmt(tl!("RAW Develop ({name})"), &[("name", &self.layer_name)]) } else { - crate::i18n::fmt(tl!("Camera Raw Filter ({layer})"), &[("layer", &self.layer_name)]) + crate::i18n::fmt(tl!("RAW Develop Filter ({layer})"), &[("layer", &self.layer_name)]) } } } diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/convert.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/convert.rs index 313110eaca..a3d146a7fb 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/convert.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/convert.rs @@ -56,11 +56,11 @@ pub(super) fn preview_area(canvas: Rect, surf: &photocraft_raster::Surface) -> R let width = area.x1.checked_sub(area.x0).filter(|n| (1..=1_048_576).contains(n)); let height = area.y1.checked_sub(area.y0).filter(|n| (1..=1_048_576).contains(n)); let (Some(w), Some(h)) = (width, height) else { - return Err("Camera Raw preview bounds are too large".into()); + return Err("RAW Develop preview bounds are too large".into()); }; let (w, h) = (w as usize, h as usize); if w.checked_mul(h).is_none_or(|pixels| pixels > 512_000_000) { - return Err("Camera Raw preview bounds are too large".into()); + return Err("RAW Develop preview bounds are too large".into()); } Ok((area, w, h)) } diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/filmstrip.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/filmstrip.rs index 1e35869dbe..85f37f2d6a 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/filmstrip.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/filmstrip.rs @@ -213,7 +213,7 @@ pub(super) fn done(app: &mut PhotocraftApp) -> Value { return json!({"done": false, "saved": saved}); } app.ui.status = if !saved.is_empty() { - crate::i18n::fmt(tl!("Saved Camera Raw settings to {file}"), &[("file", &saved.iter().map(|s| s.as_str()).collect::>().join(", "))]) + crate::i18n::fmt(tl!("Saved RAW Develop settings to {file}"), &[("file", &saved.iter().map(|s| s.as_str()).collect::>().join(", "))]) } else if stored.iter().all(|s| *s == Stored::Defaults) { tl!("Nothing to save: these raws are at their default settings").to_string() } else { diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/identity_tests.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/identity_tests.rs index 2866ef5ecb..968112d5f5 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/identity_tests.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/identity_tests.rs @@ -104,7 +104,7 @@ fn completion_identity_applies_remaining_settings_after_tab_reordering() { let state = app.session.active().unwrap(); assert_eq!(state.doc.id, replacement); assert!(!state.is_dirty(), "development finishes opening only the replacement"); - assert!(state.history.past_len() > 0, "remaining Camera Raw settings were applied"); + assert!(state.history.past_len() > 0, "remaining RAW Develop settings were applied"); assert!(!app.view_docs.contains(&raw.document)); assert!(app.view_docs.contains(&replacement)); } diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/menu.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/menu.rs index 8aed0e5664..3ee43b9ca2 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/menu.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/menu.rs @@ -9,7 +9,7 @@ pub fn menu(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: &Val return None; } let Some(fields) = params.as_object() else { - return Some(Err("Camera Raw params must be an object".into())); + return Some(Err("RAW Develop params must be an object".into())); }; if fields.is_empty() { return Some( @@ -30,26 +30,26 @@ pub fn menu(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: &Val } let ui = params.get("ui")?; let Some(fields) = ui.as_object() else { - return Some(Err("Camera Raw ui must be an object".into())); + return Some(Err("RAW Develop ui must be an object".into())); }; for (key, value) in fields { match key.as_str() { "set" | "scope" | "view" | "demosaic" => {} "before" | "commit" | "cancel" | "done" | "saveSettings" | "loadSettings" | "undo" | "redo" | "auto" if value.is_boolean() => {} "before" | "commit" | "cancel" | "done" | "saveSettings" | "loadSettings" | "undo" | "redo" | "auto" => { - return Some(Err(format!("Camera Raw {key} must be a boolean"))); + return Some(Err(format!("RAW Develop {key} must be a boolean"))); } - _ => return Some(Err(format!("unknown Camera Raw ui property {key}"))), + _ => return Some(Err(format!("unknown RAW Develop ui property {key}"))), } } let ends = ["commit", "cancel", "done"].into_iter().filter(|k| ui.get(*k).and_then(Value::as_bool) == Some(true)).count(); if ends > 1 { - return Some(Err("Camera Raw takes one of commit, cancel and done".into())); + return Some(Err("RAW Develop takes one of commit, cancel and done".into())); } for (key, run) in [("saveSettings", save_settings as fn(&mut PhotocraftApp) -> Result), ("loadSettings", load_settings)] { if ui.get(key).and_then(Value::as_bool) == Some(true) { if fields.len() > 1 { - return Some(Err(format!("Camera Raw {key} must be sent on its own"))); + return Some(Err(format!("RAW Develop {key} must be sent on its own"))); } return Some(run(app)); } @@ -83,23 +83,23 @@ fn menu_update(app: &mut PhotocraftApp, ctx: &egui::Context, ui: &Value) -> Opti } if let Some(set) = ui.get("set") { if !set.is_object() { - return Some(Err("bad Camera Raw settings: expected an object".into())); + return Some(Err("bad RAW Develop settings: expected an object".into())); } let mut cur = serde_json::to_value(&d.params).unwrap_or(json!({})); if let (Value::Object(c), Value::Object(s)) = (&mut cur, set) { for (k, v) in s { if !c.contains_key(k) { - return Some(Err(format!("unknown Camera Raw setting {k}"))); + return Some(Err(format!("unknown RAW Develop setting {k}"))); } c.insert(k.clone(), v.clone()); } } next_params = match serde_json::from_value::(cur) { Ok(p) => p, - Err(e) => return Some(Err(format!("bad Camera Raw settings: {e}"))), + Err(e) => return Some(Err(format!("bad RAW Develop settings: {e}"))), }; if let Err(e) = next_params.validate_changes(&d.original) { - return Some(Err(format!("bad Camera Raw settings: {e}"))); + return Some(Err(format!("bad RAW Develop settings: {e}"))); } } let scope_update = match ui.get("scope") { diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/open.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/open.rs index 95da88ae1d..12e168bd7b 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/open.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/open.rs @@ -534,7 +534,7 @@ pub(super) enum Coverage { pub fn open(app: &mut PhotocraftApp, ctx: &egui::Context) -> Result<(), String> { if photocraft_engine::color_channels::selected(&app.session).is_some_and(|c| c.len() > 1) { - return Err("Camera Raw requires the composite or one colour channel".into()); + return Err("RAW Develop requires the composite or one colour channel".into()); } photocraft_engine::commands::find("filter.cameraRaw").map(|c| (c.enabled)(&app.session)).unwrap_or(Err("unknown command".into()))?; let (layer, surf, _) = crate::distort_ui::active_pixels(app)?; @@ -552,7 +552,7 @@ pub fn open_smart_filter(app: &mut PhotocraftApp, ctx: &egui::Context, layer: La }; let filter = sm.smart_filters.get(index).ok_or("no such smart filter")?; if filter.command != RAW { - return Err("the smart filter is not a Camera Raw filter".into()); + return Err("the smart filter is not a RAW Develop filter".into()); } let params = raw_params(RAW, &filter.params).map_err(|e| e.to_string())?; let surf = photocraft_engine::smart_cmds::render_below_filter(&st.doc, sm, index) diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/sidecar.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/sidecar.rs index 3e5c00f94f..31b6d551d6 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/sidecar.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/sidecar.rs @@ -130,9 +130,9 @@ fn existing_sidecar_is_ours(_: &str) -> Option { /// Save Settings…: the dialog's settings as a Camera Raw `.xmp` settings file. pub(super) fn save_settings(app: &mut PhotocraftApp) -> Result { - let d = app.camera_raw.as_ref().ok_or(tl!("Camera Raw isn't open"))?; + let d = app.camera_raw.as_ref().ok_or(tl!("RAW Develop isn't open"))?; let bytes = photocraft_io::camera_raw_xmp::save(&d.params).into_bytes(); - app.pick_save("Camera Raw Settings.xmp", move |app, path| { + app.pick_save("RAW Develop Settings.xmp", move |app, path| { let write = app.services.write.as_mut().ok_or("no writer configured")?; write(&path, &bytes)?; Ok(json!({"path": path})) @@ -142,10 +142,10 @@ pub(super) fn save_settings(app: &mut PhotocraftApp) -> Result { /// Load Settings…: applies a Camera Raw `.xmp` settings file's supported settings over the /// dialog's; the status bar names how many were not supported. pub(super) fn load_settings(app: &mut PhotocraftApp) -> Result { - app.camera_raw.as_ref().ok_or(tl!("Camera Raw isn't open"))?; + app.camera_raw.as_ref().ok_or(tl!("RAW Develop isn't open"))?; app.pick_file_bytes_filtered(&["xmp"], |app, name, bytes| { let file = crate::file_open::display_name(&name); - let d = app.camera_raw.as_mut().ok_or(tl!("Camera Raw isn't open"))?; + let d = app.camera_raw.as_mut().ok_or(tl!("RAW Develop isn't open"))?; let mut next = d.params.clone(); let mut report = photocraft_io::camera_raw_xmp::load(&mut next, &bytes).map_err(|e| format!("{file}: {e}"))?; // A crop only applies as a raw file opens; the filter has none, so it is not supported. @@ -164,9 +164,9 @@ pub(super) fn load_settings(app: &mut PhotocraftApp) -> Result { } app.ui.status_error = false; app.ui.status = if report.ignored.is_empty() { - crate::i18n::fmt(tl!("Loaded Camera Raw settings from {file}"), &[("file", &file)]) + crate::i18n::fmt(tl!("Loaded RAW Develop settings from {file}"), &[("file", &file)]) } else { - let template = "Loaded Camera Raw settings from {file} ({n} not supported)"; + let template = "Loaded RAW Develop settings from {file} ({n} not supported)"; crate::i18n::fmt(tl!(template), &[("file", &file), ("n", &report.ignored.len().to_string())]) }; Ok(json!({"applied": report.applied, "ignored": report.ignored})) diff --git a/crates/ui-egui/src/dialogs/camera_raw_ui/tests.rs b/crates/ui-egui/src/dialogs/camera_raw_ui/tests.rs index 76591f3df1..eb8522ba50 100644 --- a/crates/ui-egui/src/dialogs/camera_raw_ui/tests.rs +++ b/crates/ui-egui/src/dialogs/camera_raw_ui/tests.rs @@ -111,7 +111,7 @@ fn finish_worker(d: &mut CameraRawDialog, ctx: &egui::Context) { } std::thread::sleep(std::time::Duration::from_millis(5)); } - panic!("the Camera Raw preview worker never finished"); + panic!("the RAW Develop preview worker never finished"); } /// The dialog's controls develop the proxy on a worker (#5964): the frame it shows is the one @@ -200,7 +200,7 @@ fn a_worker_failure_is_reported_until_the_next_frame() { }; let fail = |app: &mut PhotocraftApp| { let (tx, rx) = std::sync::mpsc::channel(); - tx.send(Err("Camera Raw preview failed".to_string())).unwrap(); + tx.send(Err("RAW Develop preview failed".to_string())).unwrap(); let d = app.camera_raw.as_mut().unwrap(); d.pending = Some(rx); d.dirty = false; @@ -213,7 +213,7 @@ fn a_worker_failure_is_reported_until_the_next_frame() { frame(&mut app); fail(&mut app); frame(&mut app); - assert!(app.ui.status_error && app.ui.status == "Camera Raw preview failed", "{}", app.ui.status); + assert!(app.ui.status_error && app.ui.status == "RAW Develop preview failed", "{}", app.ui.status); // No new frame yet: the error stays. frame(&mut app); assert!(app.ui.status_error); @@ -372,7 +372,7 @@ fn raw_opens_in_camera_raw_and_open_redevelops() { menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"set": {"exposure": 1.0, "temperature": 30, "contrast": 20}}})).unwrap().unwrap(); let r = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"commit": true}})).unwrap().unwrap(); assert_eq!(r["redeveloped"], true, "{r}"); - assert!(r.get("filter").is_some(), "contrast is applied as a Camera Raw step: {r}"); + assert!(r.get("filter").is_some(), "contrast is applied as a RAW Develop step: {r}"); assert!(app.camera_raw.is_none()); assert_eq!(app.session.documents().len(), 1); let st = app.session.active().unwrap(); @@ -729,7 +729,7 @@ fn cancel_closes_the_raw_and_the_preference_skips_the_dialog() { open_raw(&mut app, &ctx, raw).unwrap(); let r = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"commit": true}})).unwrap().unwrap(); assert_eq!((r["document"].as_u64(), r["redeveloped"].as_bool(), r.get("filter")), (Some(0), Some(false), None), "{r}"); - assert_eq!(r.get("defaults"), None, "ProPhoto, 16-bit: no Camera Raw Default to apply: {r}"); + assert_eq!(r.get("defaults"), None, "ProPhoto, 16-bit: no RAW Develop Default to apply: {r}"); // Preference off: raws open straight away. app.run("prefs.set", json!({"path": "rawDefaults.openInCameraRaw", "value": false})).unwrap(); app.open_bytes("c.dng", &dng).unwrap(); @@ -892,7 +892,7 @@ fn camera_raw_defaults_apply_when_a_raw_opens() { open_raw(&mut app, &ctx, raw).unwrap(); let r = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"commit": true}})).unwrap().unwrap(); assert_eq!(r["defaults"], json!(["sharpenFor", "colorSpace"]), "{r}"); - assert!(r.get("filter").is_some(), "Sharpen For is a Camera Raw step: {r}"); + assert!(r.get("filter").is_some(), "Sharpen For is a RAW Develop step: {r}"); let st = app.session.active().unwrap(); assert_eq!(st.doc.depth, photocraft_color::SampleType::U16); assert_eq!(st.saved_revision, st.revision); diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsv index 5532ca8386..4d2306eeae 100644 --- a/crates/ui-egui/src/i18n/ar.tsv +++ b/crates/ui-egui/src/i18n/ar.tsv @@ -238,7 +238,7 @@ Plugins… المكونات الإضافية… Type… النص… Enhanced Controls… عناصر التحكم المحسنة… - Camera Raw… Camera Raw… + RAW Defaults… إعدادات RAW الافتراضية… Raw Defaults… إعدادات Raw الافتراضية… Integrations… التكاملات… AI Integrations… تكاملات الذكاء الاصطناعي… @@ -587,7 +587,7 @@ Last Filter آخر فلتر Filter Gallery… معرض الفلاتر… Adaptive Wide Angle… زاوية واسعة تكيفية… - Camera Raw Filter… فلتر Camera Raw… + RAW Develop Filter… فلتر معالجة RAW… Liquify… تمويع… Vanishing Point… نقطة التلاشي… Blur ضبابية @@ -929,8 +929,8 @@ Load Settings… تحميل الإعدادات… Save these settings as a Camera Raw .xmp file حفظ هذه الإعدادات كملف .xmp لـ Camera Raw Load settings from a Camera Raw .xmp file تحميل الإعدادات من ملف .xmp لـ Camera Raw - Loaded Camera Raw settings from {file} تم تحميل إعدادات Camera Raw من {file} - Loaded Camera Raw settings from {file} ({n} not supported) تم تحميل إعدادات Camera Raw من {file} ({n} غير مدعومة) + Loaded RAW Develop settings from {file} تم تحميل إعدادات معالجة RAW من {file} + Loaded RAW Develop settings from {file} ({n} not supported) تم تحميل إعدادات معالجة RAW من {file} ({n} غير مدعومة) Begin recording بدء التسجيل Bend: الانحناء: Bicubic ثنائي التكعيب @@ -958,7 +958,7 @@ Brush Reconstruct Options خيارات إعادة بناء الفرشاة Brush Tool Options خيارات أداة الفرشاة Cache Level: مستوى ذاكرة التخزين المؤقت: - Camera Raw isn't open Camera Raw غير مفتوح + RAW Develop isn't open معالجة RAW غير مفتوح Cancel إلغاء Reset إعادة تعيين Cancel (Esc) إلغاء (Esc) @@ -1936,7 +1936,7 @@ Brush preview color لون معاينة الفرشاة Cache levels مستويات ذاكرة التخزين المؤقت Cache tile size حجم بلاطة ذاكرة التخزين المؤقت - Camera Raw Defaults إعدادات Camera Raw الافتراضية + RAW Defaults إعدادات RAW الافتراضية Canvas border حدود مساحة الرسم Show canvas dots إظهار نقاط مساحة الرسم Clip thumbnails to layer bounds قصر الصور المصغرة على حدود الطبقة @@ -2023,7 +2023,6 @@ Never أبدًا Normal tip رأس عادي Open as smart object فتح ككائن ذكي - Open in camera raw فتح في Camera Raw Open documents as tabs فتح المستندات كعلامات تبويب Overscroll التمرير الزائد Performance الأداء @@ -2379,8 +2378,8 @@ 3 x 3 3 × 3 4 x 4 4 × 4 5 x 5 5 × 5 - Camera Raw Filter ({layer}) فلتر Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) فلتر معالجة RAW ({layer}) + RAW Develop ({name}) معالجة RAW ({name}) Edit Type تحرير النص Grid: الشبكة: Highlight Clipping Warning (O) تحذير اقتطاع الإضاءات (O) @@ -3619,3 +3618,8 @@ curves Smooth تنعيم Auto-size Canvas تحديد حجم مساحة الرسم تلقائيًا Keep Relative Position During Layer Reordering الإبقاء على الموضع النسبي عند إعادة ترتيب الطبقات Shrinkwrap Canvas on Save تقليص مساحة الرسم إلى المحتوى عند الحفظ + +# RAW Develop feature labels + Saved RAW Develop settings to {file} تم حفظ إعدادات معالجة RAW في {file} + RAW Develop معالجة RAW + RAW Develop Filter مرشح معالجة RAW diff --git a/crates/ui-egui/src/i18n/az.tsv b/crates/ui-egui/src/i18n/az.tsv index 7b8822c982..8014d5f99a 100644 --- a/crates/ui-egui/src/i18n/az.tsv +++ b/crates/ui-egui/src/i18n/az.tsv @@ -307,7 +307,7 @@ Last Filter Son Filtr Filter Gallery… Qalereya filtri… Liquify… Likvidləşdirin… - Camera Raw Filter… Camera Raw filtri… + RAW Develop Filter… RAW emalı filtri… Adaptive Wide Angle… Uyğunlaşan Geniş Bucaq… Lens Correction… Lens korreksiyası… Vanishing Point… Ufuq Nöqtəsi… @@ -832,8 +832,8 @@ Luminance Smoothness Parlaqlıq Hamarlığı Vignetting Vinyetləmə White Balance: As Shot Ağ Balans: Çəkiliş kimi - Camera Raw… Kamera Raw… - Camera Raw isn't open Camera Raw açıq deyil + RAW Defaults… RAW ilkin ayarları… + RAW Develop isn't open RAW emalı açıq deyil Dehaze Dehaze Texture Tekstura Focal Length Fokus Uzunluğu @@ -1092,8 +1092,6 @@ Roman Hanging Punctuation Roman asılı durğu işarələri Avoid Widows/Orphans Dul / Yetimlərdən çəkinin Compose Yarat - Adobe Single-line Composer Adobe təksətirli tərtibatçısı - Adobe Every-line Composer Adobe çoxsətirli tərtibatçısı Justification Əsaslandırma Word Spacing Söz aralığı Letter Spacing Hərf Aralığı @@ -1646,8 +1644,8 @@ Load Settings… Parametrləri yükləyin… Save these settings as a Camera Raw .xmp file Bu parametrləri Camera Raw .xmp faylı kimi yadda saxlayın Load settings from a Camera Raw .xmp file Camera Raw .xmp faylından parametrləri yükləyin - Loaded Camera Raw settings from {file} {file} -dən Camera Raw parametrləri yükləndi - Loaded Camera Raw settings from {file} ({n} not supported) {file} -dən yüklənmiş Camera Raw parametrləri ( {n} dəstəklənmir) + Loaded RAW Develop settings from {file} {file} -dən RAW emalı parametrləri yükləndi + Loaded RAW Develop settings from {file} ({n} not supported) {file} -dən yüklənmiş RAW emalı parametrləri ( {n} dəstəklənmir) After (X) Sonra (X) Original Orijinal Current Cari @@ -2212,7 +2210,7 @@ CPU (no GPU acceleration) CPU (GPU sürətləndirilməsi yoxdur) Cache levels Keş səviyyələri Cache tile size Keş kafel ölçüsü - Camera Raw Defaults Camera Raw ilkin ayarları + RAW Defaults RAW ilkin ayarları Canvas border Kətan haşiyəsi Show canvas dots Kətan nöqtələrini göstərin Clip thumbnails to layer bounds Miniatürləri qat sərhədlərinə kəsin @@ -2299,7 +2297,6 @@ Never Heç vaxt Normal tip Adi uc Open as smart object Ağıllı obyekt kimi açın - Open in camera raw Raw kamerada açın Open documents as tabs Sənədləri nişanlar kimi açın OpenGL OpenGL Orange Narıncı @@ -2440,8 +2437,8 @@ Tone Histogram Ton histoqramı Show Selected Region Seçilmiş Bölgəni göstərin cameraRaw Light İşıq - Camera Raw Filter ({layer}) Kamera Raw Filtri ( {layer} ) - Camera Raw ({name}) Kamera Raw ( {name} ) + RAW Develop Filter ({layer}) RAW emalı Filtri ( {layer} ) + RAW Develop ({name}) RAW emalı ( {name} ) Aqua Su cameraRaw Amount Miqdar cameraRaw Blacks Qara sahələr @@ -3192,13 +3189,11 @@ curves Smooth Hamarlama Adjustment Layers Tənzimləmə Layları Adjustment Properties Tənzimləmə xassələri Adjustment layers have nothing to transform Tənzimləmə qatlarinin çevriləcək heç nəsi yoxdur - Adobe PDF Presets… Hazır Adobe PDF ayarları… Adobe-rgb-compat Adobe-rgb-uyğundur Adwaita (Dark) Adwaita (Qaranlıq) Adwaita (Light) Adwaita (İşıq) After Sonra Airbrush: keeps painting while the pointer rests. Airbrush: göstərici dayanarkən rəngləməyə davam edir. - All shortcuts reset to Photoshop defaults. Bütün qısayollar Photoshop defoltlarına sıfırlanır. Altitude Hündürlük Ambience Mühit Ambient Ətraf mühit @@ -3283,8 +3278,8 @@ curves Smooth Hamarlama Brush Type Fırça növü Burlap Çuval bezi Calculations Hesablamalar - Camera Raw Kamera Raw - Camera Raw Filter Camera Raw filtri + RAW Develop RAW emalı + RAW Develop Filter RAW emalı filtri Cancel transform Çevrilməni ləğv edin Candle Light Şam işığı Canvas Size Kətan Ölçüsü @@ -3431,7 +3426,6 @@ curves Smooth Hamarlama Deep Yellow Tünd Sarı Default Foreground and Background Colors Defolt Ön və Fon Rəngləri Default Leaves Defolt yarpaqlar - Default Photoshop Size Defolt Photoshop Ölçüsü Defaults Standartlar Define Brush Preset Fırçanın Əvvəlcədən təyinini təyin edin Define Custom Shape Fərdi Formanı müəyyənləşdirin @@ -4516,9 +4510,9 @@ shape Appearance Görünüş @plural {n} document|{n} documents {n} sənəd|{n} sənəd @plural {n} pixel|{n} pixels {n} piksel|{n} piksel cameraRaw Before (Y) Əvvəl (Y) -cameraRaw Camera Raw ({name}) Kamera Raw ( {name} ) -cameraRaw Camera Raw Filter ({layer}) Kamera Raw Filtri ( {layer} ) -cameraRaw Camera Raw isn't open Camera Raw açıq deyil +cameraRaw RAW Develop ({name}) RAW emalı ( {name} ) +cameraRaw RAW Develop Filter ({layer}) RAW emalı Filtri ( {layer} ) +cameraRaw RAW Develop isn't open RAW emalı açıq deyil cameraRaw Cancel Ləğv et cameraRaw Cancelled opening {name} {name} açılışı ləğv edildi cameraRaw Cancelled {label} Ləğv edildi {label} @@ -4530,7 +4524,7 @@ cameraRaw Highlight Clipping Warning (O) Vurğulanan Kəsmə Xəbərdarlığı ( cameraRaw Highlight Priority Prioriteti vurğulayın cameraRaw Load Settings… Parametrləri yükləyin… cameraRaw Load settings from a Camera Raw .xmp file Camera Raw .xmp faylından parametrləri yükləyin -cameraRaw Loaded Camera Raw settings from {file} {file} -dən Camera Raw parametrləri yükləndi +cameraRaw Loaded RAW Develop settings from {file} {file} -dən RAW emalı parametrləri yükləndi cameraRaw Noise Reduction Səs-küyün azaldılması cameraRaw OK Oldu cameraRaw Open Aç @@ -4633,3 +4627,6 @@ smartSvg SVG editor opened. Save the SVG to update this Smart Object. SVG redakt Auto-size Canvas Kətanın ölçüsünü avtomatik təyin edin Keep Relative Position During Layer Reordering Qatları yenidən sıralayarkən nisbi mövqeyi saxlayın Shrinkwrap Canvas on Save Saxlayarkən kətanı məzmuna sıxın + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW emalı ayarları {file} faylında saxlanıldı diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 27c056d5e3..9de214dd15 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -18,7 +18,7 @@ # Conventions: Bosnian Latin script, Ijekavian, standard Bosnian vocabulary where the neighbouring # languages differ (historija, sačuvaj, tačka, datoteka, postavke), sentence case. Commands are # imperatives (Otvori…, Sačuvaj kao…), tools read "Alat …" (Alat četkica). Quotation marks „…” -# around names. Product and technology names (PhotoCraft, Camera Raw, OpenType, Lab ...) and +# around names. Product and technology names (PhotoCraft, RAW Develop, OpenType, Lab ...) and # RGB/CMYK stay as they are; the trailing "…" of dialog commands is kept. Rows Redovi @@ -216,7 +216,7 @@ Plugins… Dodaci… Type… Vrsta… Enhanced Controls… Poboljšane kontrole… - Camera Raw… Camera Raw… + RAW Defaults… Zadane RAW postavke… Raw Defaults… Zadane postavke za RAW… Integrations… Integracije… AI Integrations… AI integracije… @@ -531,7 +531,7 @@ Last Filter Posljednji filter Filter Gallery… Galerija filtera… Adaptive Wide Angle… Prilagodljivi široki ugao… - Camera Raw Filter… Camera Raw filter… + RAW Develop Filter… RAW obrada filter… Liquify… Ukapljivanje… Vanishing Point… Tačka nestajanja… Blur Zamućenje @@ -904,7 +904,7 @@ Brush Reconstruct Options Opcije rekonstrukcije četkicom Brush Tool Options Opcije alata četkica Cache Level: Nivo keša: - Camera Raw isn't open Camera Raw nije otvoren + RAW Develop isn't open RAW obrada nije otvoren Cancel Otkaži Cancel (Esc) Otkaži (Esc) Cancel any current edits (Esc) Otkaži sve trenutne izmjene (Esc) @@ -1860,7 +1860,7 @@ Brush preview color Boja pregleda četkice Cache levels Nivoi keša Cache tile size Veličina pločice keša - Camera Raw Defaults Zadane postavke Camera Raw + RAW Defaults Zadane RAW postavke Canvas border Okvir platna Show canvas dots Prikaži tačke platna Clip thumbnails to layer bounds Ograniči sličice na granice sloja @@ -1947,7 +1947,6 @@ Never Nikad Normal tip Normalni vrh Open as smart object Otvori kao pametni objekat - Open in camera raw Otvori u Camera Raw Open documents as tabs Otvaraj dokumente kao kartice Overscroll Prekoračenje pomjeranja Performance Performanse @@ -2358,8 +2357,6 @@ Roman Hanging Punctuation Latinična viseća interpunkcija Avoid Widows/Orphans Izbjegavaj udovice/siročad Compose Sastavi - Adobe Single-line Composer Adobe slagač jednog reda - Adobe Every-line Composer Adobe slagač svih redova Justification Obostrano poravnanje Word Spacing Razmak riječi Letter Spacing Razmak slova @@ -2614,7 +2611,6 @@ Intersect with Presijeci sa Capture Comp Zabilježi kompoziciju No Layer Comps Nema kompozicija slojeva - Adobe PDF Presets… Adobe PDF predlošci… 3D… 3D… Technology Previews… Pregledi tehnologije… Background from Layer Pozadina iz sloja @@ -2704,8 +2700,8 @@ Tone Histogram Tonski histogram Show Selected Region Prikaži odabranu regiju cameraRaw Light Svjetlo - Camera Raw Filter ({layer}) Camera Raw filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW obrada filter ({layer}) + RAW Develop ({name}) RAW obrada ({name}) cameraRaw Lights Svijetli dijelovi cameraRaw Darks Tamni dijelovi cameraRaw Blacks Crne @@ -3728,8 +3724,8 @@ layerLabel No Color Bez boje Border Okvir Box Blur Kutijasto zamućenje Calculations Proračuni - Camera Raw Camera Raw - Camera Raw Filter Camera Raw filter + RAW Develop RAW obrada + RAW Develop Filter RAW obrada filter Channel1 Kanal1 Channel2 Kanal2 Channel3 Kanal3 @@ -4079,7 +4075,6 @@ layerLabel Magenta Magenta Save Path Sačuvaj putanju cameraRaw Highlights Svijetli tonovi cameraRaw Shadows Sjene - All shortcuts reset to Photoshop defaults. Sve prečice su vraćene na zadane vrijednosti Photoshopa. Temporary Privremeno none nijedno red crvena @@ -4129,7 +4124,6 @@ cameraRaw Feather Omekšavanje ivica cameraRaw Midpoint Srednja tačka cameraRaw Roundness Zaobljenost cameraRaw Size Veličina - Default Photoshop Size Zadana veličina Photoshopa document Orientation Orijentacija Arc Lower Donji luk Arc Upper Gornji luk @@ -4154,8 +4148,8 @@ shape Appearance Izgled Load Settings… Učitaj postavke… Save these settings as a Camera Raw .xmp file Sačuvaj ove postavke kao Camera Raw .xmp datoteku Load settings from a Camera Raw .xmp file Učitaj postavke iz Camera Raw .xmp datoteke - Loaded Camera Raw settings from {file} Učitane postavke Camera Raw iz {file} - Loaded Camera Raw settings from {file} ({n} not supported) Učitane postavke Camera Raw iz {file} ({n} nije podržano) + Loaded RAW Develop settings from {file} Učitane postavke RAW obrada iz {file} + Loaded RAW Develop settings from {file} ({n} not supported) Učitane postavke RAW obrada iz {file} ({n} nije podržano) Manage submitted jobs in the system print queue Upravljajte poslanim zadacima u sistemskom redu za štampanje Pick Color From Image Uzmi boju iz slike Drag to pan · Scroll to zoom · Double-click to fit Prevucite za pomjeranje · Pomjerite točkić za zumiranje · Dvostruki klik za uklapanje @@ -4561,9 +4555,9 @@ shape Appearance Izgled @plural {n} document|{n} documents {n} dokument|{n} dokumenta|{n} dokumenata @plural {n} pixel|{n} pixels {n} piksel|{n} piksela|{n} piksela cameraRaw Before (Y) Prije (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw filter ({layer}) -cameraRaw Camera Raw isn't open Camera Raw nije otvoren +cameraRaw RAW Develop ({name}) RAW obrada ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW obrada filter ({layer}) +cameraRaw RAW Develop isn't open RAW obrada nije otvoren cameraRaw Cancel Otkaži cameraRaw Canceled opening {name} Otkazano otvaranje {name} cameraRaw Canceled {label} Otkazano: {label} @@ -4575,7 +4569,7 @@ cameraRaw Highlight Clipping Warning (O) Upozorenje o odsijecanju svijetlih tono cameraRaw Highlight Priority Prioritet svijetlih tonova cameraRaw Load Settings… Učitaj postavke… cameraRaw Load settings from a Camera Raw .xmp file Učitaj postavke iz Camera Raw .xmp datoteke -cameraRaw Loaded Camera Raw settings from {file} Učitane postavke Camera Raw iz {file} +cameraRaw Loaded RAW Develop settings from {file} Učitane postavke RAW obrada iz {file} cameraRaw Noise Reduction Smanjenje šuma cameraRaw OK U redu cameraRaw Open Otvori @@ -4647,3 +4641,6 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Auto-size Canvas Automatski promijeni veličinu platna Keep Relative Position During Layer Reordering Zadrži relativni položaj pri promjeni redoslijeda slojeva Shrinkwrap Canvas on Save Smanji platno na sadržaj pri sačuvanju + +# RAW Develop feature labels + Saved RAW Develop settings to {file} Postavke RAW obrade sačuvane u {file} diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index bc6a435b09..feab402a72 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -49,7 +49,7 @@ # Strings added to the UI after this catalog was first written (rebase onto main, 2026-10). # Gradient Editor window, opened from the options bar's gradient swatch. # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title @@ -87,7 +87,7 @@ # Smart Filter editors # Dynamic labels the tl! literal scanner cannot see: filter and Filter Gallery parameter names and -# choices (humanized from their keys), Camera Raw controls, render filters (Flame, Picture Frame, Tree), +# choices (humanized from their keys), RAW Develop controls, render filters (Flame, Picture Frame, Tree), # measurement columns, file info fields and the macOS application menu. Translated the same way as # above, from the plain meaning of the English label. # Select and Mask view modes (#1754) @@ -129,7 +129,7 @@ # Labels the UI looks up through a variable (tool, glyph-group, Liquify and warp names, command # parameters and choices humanized from their keys, history steps and contextual -# Camera Raw / layer labels) that other catalogs already covered. Translated the same way as +# RAW Develop / layer labels) that other catalogs already covered. Translated the same way as # above, from the plain meaning of the English label. # DDS Options (#1327) @@ -359,7 +359,7 @@ Plugins… Zásuvné moduly… Type… Text… Enhanced Controls… Rozšířené ovládání… - Camera Raw… Camera Raw… + RAW Defaults… Výchozí nastavení RAW… Raw Defaults… Výchozí nastavení Raw… Integrations… Integrace… AI Integrations… Integrace AI… @@ -692,7 +692,7 @@ Last Filter Poslední filtr Filter Gallery… Galerie filtrů… Adaptive Wide Angle… Adaptivní širokoúhlý objektiv… - Camera Raw Filter… Filtr Camera Raw… + RAW Develop Filter… Filtr Vyvolání RAW… Liquify… Zkapalnit… Vanishing Point… Úběžník… Blur Rozostření @@ -1050,8 +1050,8 @@ Load Settings… Načíst nastavení… Save these settings as a Camera Raw .xmp file Uložit toto nastavení jako soubor Camera Raw .xmp Load settings from a Camera Raw .xmp file Načíst nastavení ze souboru Camera Raw .xmp - Loaded Camera Raw settings from {file} Nastavení Camera Raw načteno ze souboru {file} - Loaded Camera Raw settings from {file} ({n} not supported) Nastavení Camera Raw načteno ze souboru {file} (nepodporováno: {n}) + Loaded RAW Develop settings from {file} Nastavení Vyvolání RAW načteno ze souboru {file} + Loaded RAW Develop settings from {file} ({n} not supported) Nastavení Vyvolání RAW načteno ze souboru {file} (nepodporováno: {n}) Begin recording Zahájit záznam Bend: Ohyb: Bicubic Bikubická @@ -1079,7 +1079,7 @@ Brush Reconstruct Options Možnosti štětce rekonstrukce Brush Tool Options Možnosti nástroje štětec Cache Level: Úroveň mezipaměti: - Camera Raw isn't open Camera Raw není otevřen + RAW Develop isn't open Vyvolání RAW není otevřen Cancel Zrušit Cancel (Esc) Zrušit (Esc) Manage submitted jobs in the system print queue Spravovat odeslané úlohy v systémové tiskové frontě @@ -2054,7 +2054,7 @@ Brush preview color Barva náhledu štětce Cache levels Úrovně mezipaměti Cache tile size Velikost dlaždice mezipaměti - Camera Raw Defaults Výchozí nastavení Camera Raw + RAW Defaults Výchozí nastavení RAW Canvas border Okraj plátna Show canvas dots Zobrazit tečky plátna Clip thumbnails to layer bounds Oříznout miniatury na hranice vrstvy @@ -2141,7 +2141,6 @@ Never Nikdy Normal tip Normální hrot Open as smart object Otevřít jako chytrý objekt - Open in camera raw Otevírat v Camera Raw Open documents as tabs Otevírat dokumenty jako záložky Overscroll Posouvání za okraj Performance Výkon @@ -2419,8 +2418,8 @@ Tone Histogram Histogram tónů Show Selected Region Zobrazit vybranou oblast cameraRaw Light Světlo - Camera Raw Filter ({layer}) Filtr Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtr Vyvolání RAW ({layer}) + RAW Develop ({name}) Vyvolání RAW ({name}) cameraRaw Red Červené cameraRaw Orange Oranžové cameraRaw Yellow Žluté @@ -2899,8 +2898,8 @@ cameraData Lens Objektiv Burlap Pytlovina Calculations Výpočty Camera Calibration Kalibrace fotoaparátu - Camera Raw Camera Raw - Camera Raw Filter Filtr Camera Raw + RAW Develop Vyvolání RAW + RAW Develop Filter Filtr Vyvolání RAW Candle Light Plamen svíčky Canvas Size Velikost plátna Caption Popisek @@ -4359,7 +4358,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Zobrazit hranice vrstvy při najetí Expand layer group on click Rozbalit skupinu vrstev kliknutím Show hover bounds from Layers Zobrazit hranice při najetí z panelu Vrstvy - Saved Camera Raw settings to {file} Nastavení Camera Raw uložena do {file} + Saved RAW Develop settings to {file} Nastavení Vyvolání RAW uložena do {file} Save the settings to each raw's sidecar without opening it Uložit nastavení do souboru sidecar každého snímku raw bez jeho otevření No settings saved: these raws can't keep a sidecar here Nic neuloženo: tyto snímky raw zde nemohou mít soubor sidecar Some settings could not be saved; the raws stay open Některá nastavení nelze uložit; snímky raw zůstávají otevřené diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 2cabab7c43..78467514d2 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -350,7 +350,7 @@ Last Filter Seneste filter Filter Gallery… Filtergalleri… Liquify… Gør flydende… - Camera Raw Filter… Camera Raw-filter… + RAW Develop Filter… RAW-fremkaldelse-filter… Adaptive Wide Angle… Adaptiv vidvinkel… Lens Correction… Objektivkorrektion… Vanishing Point… Forsvindingspunkt… @@ -875,7 +875,7 @@ Working Black Plate Arbejdssortplade Working Gray Plate Arbejdsgråplade -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs Basic Grundlæggende Detail Detalje HSL/Grayscale HSL/Gråtoner @@ -905,8 +905,8 @@ Luminance Smoothness Luminansglathed Vignetting Vignettering White Balance: As Shot Hvidbalance: Som fotograferet - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw er ikke åben + RAW Defaults… RAW-standarder… + RAW Develop isn't open RAW-fremkaldelse er ikke åben Dehaze Fjern dis Texture Tekstur Focal Length Brændvidde @@ -1177,8 +1177,6 @@ Roman Hanging Punctuation Romersk hængende tegnsætning Avoid Widows/Orphans Undgå enlige linjer Compose Komponér - Adobe Single-line Composer Adobe-enkeltlinjeopsætter - Adobe Every-line Composer Adobe-flerlinjeopsætter Justification Justering Word Spacing Ordafstand Letter Spacing Bogstavafstand @@ -1760,8 +1758,8 @@ Load Settings… Indlæs indstillinger… Save these settings as a Camera Raw .xmp file Gem disse indstillinger som en Camera Raw .xmp-fil Load settings from a Camera Raw .xmp file Indlæs indstillinger fra en Camera Raw .xmp-fil - Loaded Camera Raw settings from {file} Indlæste Camera Raw-indstillinger fra {file} - Loaded Camera Raw settings from {file} ({n} not supported) Indlæste Camera Raw-indstillinger fra {file} ({n} understøttes ikke) + Loaded RAW Develop settings from {file} Indlæste RAW-fremkaldelse-indstillinger fra {file} + Loaded RAW Develop settings from {file} ({n} not supported) Indlæste RAW-fremkaldelse-indstillinger fra {file} ({n} understøttes ikke) After (X) Efter (X) Original Original Current Aktuel @@ -2348,7 +2346,7 @@ CPU (no GPU acceleration) CPU (ingen GPU-acceleration) Cache levels Cacheniveauer Cache tile size Flisestørrelse for cache - Camera Raw Defaults Camera Raw-standarder + RAW Defaults RAW-standarder Canvas border Lærredskant Show canvas dots Vis lærredsprikker Clip thumbnails to layer bounds Klip miniaturer til laggrænser @@ -2440,7 +2438,6 @@ Never Aldrig Normal tip Normal spids Open as smart object Åbn som smartobjekt - Open in camera raw Åbn i Camera Raw Open documents as tabs Åbn dokumenter som faner OpenGL OpenGL Orange Orange @@ -2581,9 +2578,9 @@ Tone Histogram Tonehistogram Show Selected Region Vis markeret område cameraRaw Light Lys -# Camera Raw: contextual controls and window title - Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) +# RAW Develop: contextual controls and window title + RAW Develop Filter ({layer}) RAW-fremkaldelse-filter ({layer}) + RAW Develop ({name}) RAW-fremkaldelse ({name}) Aqua Turkis cameraRaw Amount Mængde cameraRaw Blacks Sorte @@ -3388,7 +3385,7 @@ curves Smooth Udjævn {name} was changed by another app after it was opened or saved here. {name} blev ændret af et andet program, efter at den blev åbnet eller gemt her. Replace it with this document, or cancel and use File › Save As to keep both. Erstat den med dette dokument, eller annullér, og brug Filer › Gem som for at beholde begge. -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -3414,13 +3411,11 @@ curves Smooth Udjævn Adjustment Layers Justeringslag Adjustment Properties Justeringsegenskaber Adjustment layers have nothing to transform Justeringslag har intet at transformere - Adobe PDF Presets… Adobe PDF-forudindstillinger… Adobe-rgb-compat Adobe-rgb-kompat Adwaita (Dark) Adwaita (mørk) Adwaita (Light) Adwaita (lys) After Efter Airbrush: keeps painting while the pointer rests. Airbrush: bliver ved med at male, mens markøren hviler. - All shortcuts reset to Photoshop defaults. Alle genveje er nulstillet til Photoshop-standarderne. Altitude Højde Ambience Ambiance Ambient Omgivende @@ -3505,8 +3500,8 @@ curves Smooth Udjævn Brush Type Penseltype Burlap Sækkelærred Calculations Beregninger - Camera Raw Camera Raw - Camera Raw Filter Camera Raw-filter + RAW Develop RAW-fremkaldelse + RAW Develop Filter RAW-fremkaldelse-filter Cancel transform Annullér transformering Candle Light Stearinlys Canvas Size Lærredsstørrelse @@ -3653,7 +3648,6 @@ curves Smooth Udjævn Deep Yellow Dyb gul Default Foreground and Background Colors Standard forgrunds- og baggrundsfarver Default Leaves Standardblade - Default Photoshop Size Photoshop-standardstørrelse Defaults Standardindstillinger Define Brush Preset Definér penselforudindstilling Define Custom Shape Definér brugerdefineret form @@ -4754,9 +4748,9 @@ shape Appearance Udseende @plural {n} document|{n} documents {n} dokument|{n} dokumenter @plural {n} pixel|{n} pixels {n} pixel|{n} pixels cameraRaw Before (Y) Før (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) -cameraRaw Camera Raw isn't open Camera Raw er ikke åben +cameraRaw RAW Develop ({name}) RAW-fremkaldelse ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW-fremkaldelse-filter ({layer}) +cameraRaw RAW Develop isn't open RAW-fremkaldelse er ikke åben cameraRaw Cancel Annullér cameraRaw Canceled opening {name} Annullerede åbning af {name} cameraRaw Canceled {label} Annullerede {label} @@ -4768,7 +4762,7 @@ cameraRaw Highlight Clipping Warning (O) Advarsel om højlysklipning (O) cameraRaw Highlight Priority Højlysprioritet cameraRaw Load Settings… Indlæs indstillinger… cameraRaw Load settings from a Camera Raw .xmp file Indlæs indstillinger fra en Camera Raw .xmp-fil -cameraRaw Loaded Camera Raw settings from {file} Indlæste Camera Raw-indstillinger fra {file} +cameraRaw Loaded RAW Develop settings from {file} Indlæste RAW-fremkaldelse-indstillinger fra {file} cameraRaw Noise Reduction Støjreduktion cameraRaw OK OK cameraRaw Open Åbn @@ -4831,3 +4825,6 @@ cameraRaw White Balance: As Shot Hvidbalance: Som fotograferet Auto-size Canvas Tilpas lærredsstørrelse automatisk Keep Relative Position During Layer Reordering Bevar relativ placering ved omorganisering af lag Shrinkwrap Canvas on Save Beskær lærredet til indholdet ved lagring + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW-fremkaldelsesindstillinger gemt i {file} diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 50aaf2ba59..5d04caa42e 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -330,7 +330,7 @@ Plugins… Plug-ins… Type… Text… Enhanced Controls… Erweiterte Bedienelemente… - Camera Raw… Camera Raw… + RAW Defaults… RAW-Standardeinstellungen… Raw Defaults… RAW-Standardwerte… Integrations… Integrationen… AI Integrations… KI-Integrationen… @@ -665,7 +665,7 @@ Last Filter Letzter Filter Filter Gallery… Filtergalerie… Adaptive Wide Angle… Adaptiver Weitwinkel… - Camera Raw Filter… Camera-Raw-Filter… + RAW Develop Filter… RAW-Entwicklung-Filter… Liquify… Verflüssigen… Vanishing Point… Fluchtpunkt… Blur Weichzeichnen @@ -1009,8 +1009,8 @@ Load Settings… Einstellungen laden… Save these settings as a Camera Raw .xmp file Diese Einstellungen als Camera-Raw-.xmp-Datei speichern Load settings from a Camera Raw .xmp file Einstellungen aus einer Camera-Raw-.xmp-Datei laden - Loaded Camera Raw settings from {file} Camera-Raw-Einstellungen aus {file} geladen - Loaded Camera Raw settings from {file} ({n} not supported) Camera-Raw-Einstellungen aus {file} geladen ({n} nicht unterstützt) + Loaded RAW Develop settings from {file} RAW-Entwicklung-Einstellungen aus {file} geladen + Loaded RAW Develop settings from {file} ({n} not supported) RAW-Entwicklung-Einstellungen aus {file} geladen ({n} nicht unterstützt) Begin recording Aufnahme starten Bend: Biegung: Bicubic Bikubisch @@ -1038,7 +1038,7 @@ Brush Reconstruct Options Pinsel-Rekonstruktionsoptionen Brush Tool Options Pinselwerkzeug-Optionen Cache Level: Cache-Stufe: - Camera Raw isn't open Camera Raw ist nicht geöffnet + RAW Develop isn't open RAW-Entwicklung ist nicht geöffnet Cancel Abbrechen Reset Zurücksetzen Cancel (Esc) Abbrechen (Esc) @@ -2015,7 +2015,7 @@ Brush preview color Pinselvorschau-Farbe Cache levels Cache-Stufen Cache tile size Cache-Kachelgröße - Camera Raw Defaults Camera-Raw-Standardeinstellungen + RAW Defaults RAW-Standardeinstellungen Canvas border Zeichenflächenrand Show canvas dots Punkte der Zeichenfläche anzeigen Clip thumbnails to layer bounds Miniaturbilder auf Ebenenbegrenzung beschneiden @@ -2102,7 +2102,6 @@ Never Nie Normal tip Normale Spitze Open as smart object Als Smart-Objekt öffnen - Open in camera raw In Camera Raw öffnen Open documents as tabs Dokumente als Registerkarten öffnen Overscroll Überscrollen Performance Leistung @@ -2457,8 +2456,8 @@ 3 x 3 3 x 3 4 x 4 4 x 4 5 x 5 5 x 5 - Camera Raw Filter ({layer}) Camera-Raw-Filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW-Entwicklung-Filter ({layer}) + RAW Develop ({name}) RAW-Entwicklung ({name}) Edit Type Text bearbeiten Grid: Raster: Highlight Clipping Warning (O) Lichter-Abschneidewarnung (O) @@ -3654,7 +3653,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Ebenenbegrenzung beim Darüberfahren anzeigen Expand layer group on click Ebenengruppe per Klick erweitern Show hover bounds from Layers Begrenzung beim Darüberfahren aus Ebenen anzeigen - Saved Camera Raw settings to {file} Camera-Raw-Einstellungen in {file} gespeichert + Saved RAW Develop settings to {file} RAW-Entwicklung-Einstellungen in {file} gespeichert Save the settings to each raw's sidecar without opening it Die Einstellungen in der Filialdatei jeder Raw-Datei speichern, ohne sie zu öffnen No settings saved: these raws can't keep a sidecar here Nichts gespeichert: Diese Raw-Dateien können hier keine Filialdatei haben Some settings could not be saved; the raws stay open Einige Einstellungen konnten nicht gespeichert werden; die Raw-Dateien bleiben geöffnet @@ -3666,3 +3665,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Auto-size Canvas Zeichenflächengröße automatisch anpassen Keep Relative Position During Layer Reordering Relative Position beim Neuanordnen von Ebenen beibehalten Shrinkwrap Canvas on Save Zeichenfläche beim Speichern auf den Inhalt verkleinern + +# RAW Develop feature labels + RAW Develop RAW-Entwicklung + RAW Develop Filter RAW-Entwicklungsfilter diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index ede7cc0c2e..e355ed39ca 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1602,11 +1602,10 @@ Company Εταιρεία % of all commits % του συνόλου των commits Lines +/− Γραμμές +/− - Open in camera raw Άνοιγμα στο Camera Raw System title bar Γραμμή τίτλου συστήματος More documents Περισσότερα έγγραφα Developing {name} Επεξεργασία του {name} - Camera Raw ({name}) Επεξεργασία RAW ({name}) + RAW Develop ({name}) Επεξεργασία RAW ({name}) New Brush Preset… Νέα προεπιλογή πινέλου… Capture Brush Size in Preset Αποθήκευση μεγέθους πινέλου στην προεπιλογή Include Tool Settings Συμπερίληψη ρυθμίσεων εργαλείου @@ -1774,7 +1773,7 @@ Brush preview color Χρώμα προεπισκόπησης πινέλου Cache levels Επίπεδα προσωρινής μνήμης Cache tile size Μέγεθος πλακιδίου προσωρινής μνήμης - Camera Raw Defaults Προεπιλογές Camera Raw + RAW Defaults Προεπιλογές RAW Canvas border Περίγραμμα καμβά Show canvas dots Εμφάνιση κουκκίδων καμβά Clip thumbnails to layer bounds Περικοπή μικρογραφιών στα όρια του επιπέδου @@ -2069,11 +2068,11 @@ Load Settings… Φόρτωση ρυθμίσεων… Save these settings as a Camera Raw .xmp file Αποθήκευση αυτών των ρυθμίσεων ως αρχείο Camera Raw .xmp Load settings from a Camera Raw .xmp file Φόρτωση ρυθμίσεων από αρχείο Camera Raw .xmp - Loaded Camera Raw settings from {file} Φορτώθηκαν ρυθμίσεις Camera Raw από το {file} - Loaded Camera Raw settings from {file} ({n} not supported) Φορτώθηκαν ρυθμίσεις Camera Raw από το {file} ({n} δεν υποστηρίζονται) + Loaded RAW Develop settings from {file} Φορτώθηκαν ρυθμίσεις Επεξεργασία RAW από το {file} + Loaded RAW Develop settings from {file} ({n} not supported) Φορτώθηκαν ρυθμίσεις Επεξεργασία RAW από το {file} ({n} δεν υποστηρίζονται) Blending Ανάμειξη - Camera Raw Filter ({layer}) Φίλτρο Camera Raw ({layer}) - Camera Raw isn't open Το Camera Raw δεν είναι ανοιχτό + RAW Develop Filter ({layer}) Φίλτρο Επεξεργασία RAW ({layer}) + RAW Develop isn't open Το Επεξεργασία RAW δεν είναι ανοιχτό Clarity Διαύγεια Color Detail Λεπτομέρεια χρώματος Color Grading Χρωματική διαβάθμιση @@ -2162,7 +2161,6 @@ Adds grain to the soft edges of the brush tip. Προσθέτει κόκκο στις απαλές άκρες του πινέλου. Adjust for Zoom Προσαρμογή στη μεγέθυνση Adjustment visible Η προσαρμογή είναι ορατή - Adobe PDF Presets… Προεπιλογές Adobe PDF… Adobe RGB (1998) compatible Συμβατό με Adobe RGB (1998) Advanced Blending Σύνθετες επιλογές ανάμειξης After (X) Μετά (X) @@ -2262,10 +2260,10 @@ Bulge Κυρτότητα Cache Level: Επίπεδο προσωρινής μνήμης: Calculations Υπολογισμοί - Camera Raw Επεξεργασία ακατέργαστης εικόνας - Camera Raw Filter Φίλτρο επεξεργασίας ακατέργαστης εικόνας - Camera Raw Filter… Φίλτρο επεξεργασίας ακατέργαστης εικόνας… - Camera Raw… Επεξεργασία ακατέργαστης εικόνας… + RAW Develop Επεξεργασία RAW + RAW Develop Filter Φίλτρο Επεξεργασία RAW + RAW Develop Filter… Φίλτρο Επεξεργασία RAW… + RAW Defaults… Προεπιλογές RAW… Cancel (Esc) Ακύρωση (Esc) Manage submitted jobs in the system print queue Διαχειριστείτε τις υποβληθείσες εργασίες στην ουρά εκτύπωσης του συστήματος Cancel any current edits (Esc) Ακύρωση τρεχουσών αλλαγών (Esc) @@ -4318,7 +4316,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Εμφάνιση ορίων στρώσης στο πέρασμα του δείκτη Expand layer group on click Ανάπτυξη ομάδας στρώσεων με κλικ Show hover bounds from Layers Εμφάνιση ορίων στο πέρασμα από τις Στρώσεις - Saved Camera Raw settings to {file} Οι ρυθμίσεις Camera Raw αποθηκεύτηκαν στο {file} + Saved RAW Develop settings to {file} Οι ρυθμίσεις Επεξεργασία RAW αποθηκεύτηκαν στο {file} Save the settings to each raw's sidecar without opening it Αποθήκευση των ρυθμίσεων στο συνοδευτικό αρχείο κάθε raw χωρίς άνοιγμα No settings saved: these raws can't keep a sidecar here Δεν αποθηκεύτηκε τίποτα: αυτά τα raw δεν μπορούν να έχουν συνοδευτικό αρχείο εδώ Some settings could not be saved; the raws stay open Ορισμένες ρυθμίσεις δεν ήταν δυνατό να αποθηκευτούν· τα raw παραμένουν ανοιχτά diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index a1dfc86f11..6e2c269f02 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -29,7 +29,7 @@ # Spanish follows the tool wording used above (Herramienta X). # Command-id override: under Edit > Purge a bare "Deshacer" reads as an action, not the history. # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title # About ▸ Contributors / Models (credits) # Swatches panel # Layer Style > Blending Options (Advanced Blending) @@ -54,7 +54,7 @@ # Print dialog (#2697) # Counted status messages and labels (#3454; adapted from PR #3821) # View › Guides › New Guide… › Color -# Dynamic labels (filter and adjustment parameters, Camera Raw, panels, dialogs) that the +# Dynamic labels (filter and adjustment parameters, RAW Develop, panels, dialogs) that the # other catalogs already translate # Path, channel, layer style, status and System Info labels the Czech catalog added # Actions panel: Load/Save Actions (.atn) and kept Photoshop steps @@ -296,7 +296,7 @@ Plugins… Plugins… Type… Texto… Enhanced Controls… Controles mejorados… - Camera Raw… Camera Raw… + RAW Defaults… Valores predeterminados de RAW… Raw Defaults… Valores predeterminados de Raw… Integrations… Integraciones… AI Integrations… Integraciones de IA… @@ -629,7 +629,7 @@ Last Filter Último filtro Filter Gallery… Galería de filtros… Adaptive Wide Angle… Gran angular adaptable… - Camera Raw Filter… Filtro de Camera Raw… + RAW Develop Filter… Filtro de Revelado RAW… Liquify… Licuar… Vanishing Point… Punto de fuga… Blur Desenfocar @@ -983,8 +983,8 @@ Load Settings… Cargar ajustes… Save these settings as a Camera Raw .xmp file Guardar estos ajustes como archivo .xmp de Camera Raw Load settings from a Camera Raw .xmp file Cargar ajustes desde un archivo .xmp de Camera Raw - Loaded Camera Raw settings from {file} Ajustes de Camera Raw cargados desde {file} - Loaded Camera Raw settings from {file} ({n} not supported) Ajustes de Camera Raw cargados desde {file} ({n} no compatibles) + Loaded RAW Develop settings from {file} Ajustes de Revelado RAW cargados desde {file} + Loaded RAW Develop settings from {file} ({n} not supported) Ajustes de Revelado RAW cargados desde {file} ({n} no compatibles) Begin recording Iniciar grabación Bend: Curvatura: Bicubic Bicúbica @@ -1012,7 +1012,7 @@ Brush Reconstruct Options Opciones de reconstrucción del pincel Brush Tool Options Opciones de la herramienta Pincel Cache Level: Nivel de caché: - Camera Raw isn't open Camera Raw no está abierto + RAW Develop isn't open Revelado RAW no está abierto Cancel Cancelar Cancel (Esc) Cancelar (Esc) Manage submitted jobs in the system print queue Gestionar los trabajos enviados en la cola de impresión del sistema @@ -1984,7 +1984,7 @@ Brush preview color Color de vista previa del pincel Cache levels Niveles de caché Cache tile size Tamaño de tesela de caché - Camera Raw Defaults Valores predeterminados de Camera Raw + RAW Defaults Valores predeterminados de RAW Canvas border Borde del lienzo Show canvas dots Mostrar puntos del lienzo Clip thumbnails to layer bounds Recortar miniaturas a los límites de la capa @@ -2071,7 +2071,6 @@ Never Nunca Normal tip Punta normal Open as smart object Abrir como objeto inteligente - Open in camera raw Abrir en Camera Raw Open documents as tabs Abrir los documentos como pestañas Overscroll Sobredesplazamiento Performance Rendimiento @@ -2432,8 +2431,8 @@ Tone Histogram Histograma tonal Show Selected Region Mostrar región seleccionada cameraRaw Light Luz - Camera Raw Filter ({layer}) Filtro de Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtro de Revelado RAW ({layer}) + RAW Develop ({name}) Revelado RAW ({name}) cameraRaw Lights Claros cameraRaw Darks Oscuros cameraRaw Red Rojos @@ -3030,8 +3029,6 @@ curves Smooth Suavizar Roman Hanging Punctuation Puntuación latina colgante Avoid Widows/Orphans Evitar líneas viudas y huérfanas Compose Componer - Adobe Single-line Composer Compositor de línea única de Adobe - Adobe Every-line Composer Compositor multilínea de Adobe Word Spacing Espacio entre palabras Letter Spacing Espacio entre caracteres Glyph Scaling Escala de glifos @@ -3227,7 +3224,6 @@ curves Smooth Suavizar Intersect with Intersecar con Capture Comp Capturar composición No Layer Comps No hay composiciones de capas - Adobe PDF Presets… Ajustes preestablecidos de Adobe PDF… 3D… 3D… Technology Previews… Previsualizaciones de tecnología… Add a mask (from the selection; ⌥ inverts) Añadir una máscara (a partir de la selección; ⌥ invierte) @@ -3844,8 +3840,8 @@ layerLabel No Color Sin color Border Borde Box Blur Desenfoque de cuadro Calculations Cálculos - Camera Raw Camera Raw - Camera Raw Filter Filtro de Camera Raw + RAW Develop Revelado RAW + RAW Develop Filter Filtro de Revelado RAW Channel1 Canal 1 Channel2 Canal 2 Channel3 Canal 3 @@ -4518,7 +4514,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Mostrar límites de capa al pasar el puntero Expand layer group on click Expandir grupo de capas al hacer clic Show hover bounds from Layers Mostrar límites al pasar el puntero desde Capas - Saved Camera Raw settings to {file} Ajustes de Camera Raw guardados en {file} + Saved RAW Develop settings to {file} Ajustes de Revelado RAW guardados en {file} Save the settings to each raw's sidecar without opening it Guardar los ajustes en el archivo sidecar de cada raw sin abrirlo No settings saved: these raws can't keep a sidecar here No se guardó nada: estos raw no pueden tener un archivo sidecar aquí Some settings could not be saved; the raws stay open No se pudieron guardar algunos ajustes; los raw siguen abiertos diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 142e2adfad..2c8376ebab 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -351,7 +351,7 @@ Last Filter Viimeisin suodatin Filter Gallery… Suodatingalleria… Liquify… Nesteytä… - Camera Raw Filter… Camera Raw -suodatin… + RAW Develop Filter… RAW-kehitys -suodatin… Adaptive Wide Angle… Mukautuva laajakulma… Lens Correction… Objektiivin korjaus… Vanishing Point… Pakopiste… @@ -876,7 +876,7 @@ Working Black Plate Työ-mustalevy Working Gray Plate Harmaa työlevy -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs Basic Perusasetukset Detail Yksityiskohdat HSL/Grayscale HSL/harmaasävy @@ -906,8 +906,8 @@ Luminance Smoothness Luminanssin tasaisuus Vignetting Vinjetointi White Balance: As Shot Valkotasapaino: kuvauksen mukainen - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw ei ole auki + RAW Defaults… RAW-oletukset… + RAW Develop isn't open RAW-kehitys ei ole auki Dehaze Usvanpoisto Texture Tekstuuri Focal Length Polttoväli @@ -1178,8 +1178,6 @@ Roman Hanging Punctuation Latinalainen riippuva välimerkitys Avoid Widows/Orphans Vältä leski- ja orporivejä Compose Sommittele - Adobe Single-line Composer Adobe yksirivinen asettelija - Adobe Every-line Composer Adobe kaikkien rivien asettelija Justification Tasaus Word Spacing Sanaväli Letter Spacing Merkkiväli @@ -1761,8 +1759,8 @@ Load Settings… Lataa asetukset… Save these settings as a Camera Raw .xmp file Tallenna nämä asetukset Camera Raw .xmp -tiedostona Load settings from a Camera Raw .xmp file Lataa asetukset Camera Raw .xmp -tiedostosta - Loaded Camera Raw settings from {file} Camera Raw -asetukset ladattu tiedostosta {file} - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw -asetukset ladattu tiedostosta {file} ({n} tukematonta) + Loaded RAW Develop settings from {file} RAW-kehitys -asetukset ladattu tiedostosta {file} + Loaded RAW Develop settings from {file} ({n} not supported) RAW-kehitys -asetukset ladattu tiedostosta {file} ({n} tukematonta) After (X) Jälkeen (X) Original Alkuperäinen Current Nykyinen @@ -2349,7 +2347,7 @@ CPU (no GPU acceleration) CPU (ei GPU-kiihdytystä) Cache levels Välimuistitasot Cache tile size Välimuistin laatan koko - Camera Raw Defaults Camera Raw -oletukset + RAW Defaults RAW-oletukset Canvas border Kankaan reunus Show canvas dots Näytä kankaan pisteet Clip thumbnails to layer bounds Rajaa pikkukuvat tason rajoihin @@ -2441,7 +2439,6 @@ Never Ei koskaan Normal tip Normaali kärki Open as smart object Avaa älykkäänä objektina - Open in camera raw Avaa Camera Raw'ssa Open documents as tabs Avaa asiakirjat välilehtinä OpenGL OpenGL Orange Oranssi @@ -2582,9 +2579,9 @@ Tone Histogram Sävyhistogrammi Show Selected Region Näytä valittu alue cameraRaw Light Valo -# Camera Raw: contextual controls and window title - Camera Raw Filter ({layer}) Camera Raw -suodatin ({layer}) - Camera Raw ({name}) Camera Raw ({name}) +# RAW Develop: contextual controls and window title + RAW Develop Filter ({layer}) RAW-kehitys -suodatin ({layer}) + RAW Develop ({name}) RAW-kehitys ({name}) Aqua Turkoosi cameraRaw Amount Määrä cameraRaw Blacks Mustat @@ -3389,7 +3386,7 @@ curves Smooth Tasoita {name} was changed by another app after it was opened or saved here. Toinen ohjelma on muuttanut tiedostoa {name} sen jälkeen, kun se avattiin tai tallennettiin täällä. Replace it with this document, or cancel and use File › Save As to keep both. Korvaa se tällä asiakirjalla, tai peruuta ja käytä komentoa Tiedosto › Tallenna nimellä, jos haluat säilyttää molemmat. -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -3415,13 +3412,11 @@ curves Smooth Tasoita Adjustment Layers Säätötasot Adjustment Properties Säädön ominaisuudet Adjustment layers have nothing to transform Säätötasoilla ei ole mitään muunnettavaa - Adobe PDF Presets… Adobe PDF -esiasetukset… Adobe-rgb-compat Adobe RGB -yhteensopiva Adwaita (Dark) Adwaita (tumma) Adwaita (Light) Adwaita (vaalea) After Jälkeen Airbrush: keeps painting while the pointer rests. Ilmasivellin: maalaa edelleen, kun osoitin on paikallaan. - All shortcuts reset to Photoshop defaults. Kaikki pikanäppäimet palautettu Photoshopin oletuksiin. Altitude Korkeus Ambience Ympäristövalo Ambient Ympäristö @@ -3506,8 +3501,8 @@ curves Smooth Tasoita Brush Type Siveltimen tyyppi Burlap Juuttikangas Calculations Laskutoimitukset - Camera Raw Camera Raw - Camera Raw Filter Camera Raw -suodatin + RAW Develop RAW-kehitys + RAW Develop Filter RAW-kehitys -suodatin Cancel transform Peruuta muunnos Candle Light Kynttilänvalo Canvas Size Kankaan koko @@ -3654,7 +3649,6 @@ curves Smooth Tasoita Deep Yellow Syvä keltainen Default Foreground and Background Colors Oletusarvoiset edusta- ja taustavärit Default Leaves Oletuslehdet - Default Photoshop Size Photoshopin oletuskoko Defaults Oletukset Define Brush Preset Määritä siveltimen esiasetus Define Custom Shape Määritä mukautettu muoto @@ -4755,9 +4749,9 @@ shape Appearance Ulkoasu @plural {n} document|{n} documents {n} asiakirja|{n} asiakirjaa @plural {n} pixel|{n} pixels {n} pikseli|{n} pikseliä cameraRaw Before (Y) Ennen (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw -suodatin ({layer}) -cameraRaw Camera Raw isn't open Camera Raw ei ole auki +cameraRaw RAW Develop ({name}) RAW-kehitys ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW-kehitys -suodatin ({layer}) +cameraRaw RAW Develop isn't open RAW-kehitys ei ole auki cameraRaw Cancel Peruuta cameraRaw Canceled opening {name} Tiedoston {name} avaaminen peruutettu cameraRaw Canceled {label} Peruutettu: {label} @@ -4769,7 +4763,7 @@ cameraRaw Highlight Clipping Warning (O) Korostusten leikkautumisvaroitus (O) cameraRaw Highlight Priority Korostusten prioriteetti cameraRaw Load Settings… Lataa asetukset… cameraRaw Load settings from a Camera Raw .xmp file Lataa asetukset Camera Raw .xmp -tiedostosta -cameraRaw Loaded Camera Raw settings from {file} Camera Raw -asetukset ladattu tiedostosta {file} +cameraRaw Loaded RAW Develop settings from {file} RAW-kehitys -asetukset ladattu tiedostosta {file} cameraRaw Noise Reduction Kohinan vaimennus cameraRaw OK OK cameraRaw Open Avaa @@ -4832,3 +4826,6 @@ cameraRaw White Balance: As Shot Valkotasapaino: kuvauksen mukainen Auto-size Canvas Muuta kankaan kokoa automaattisesti Keep Relative Position During Layer Reordering Säilytä suhteellinen sijainti tasojen järjestystä muutettaessa Shrinkwrap Canvas on Save Pienennä kangas sisältöön tallennettaessa + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW-kehityksen asetukset tallennettu tiedostoon {file} diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 0fa0707b4d..7d869a71da 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -38,7 +38,7 @@ # Labels added on main after this catalog (depth labels, Wayland drop, profiles, rendering mode) -# Camera Raw scopes and the Patch tool +# RAW Develop scopes and the Patch tool # Warp grid presets (#388) @@ -326,7 +326,7 @@ Plugins… Extensions… Type… Texte… Enhanced Controls… Commandes avancées… - Camera Raw… Camera Raw… + RAW Defaults… Valeurs par défaut RAW… Raw Defaults… Valeurs Raw par défaut… Integrations… Intégrations… AI Integrations… Intégrations d'IA… @@ -645,7 +645,7 @@ Last Filter Dernier filtre Filter Gallery… Galerie de filtres… Adaptive Wide Angle… Grand angle adaptatif… - Camera Raw Filter… Filtre Camera Raw… + RAW Develop Filter… Filtre Développement RAW… Liquify… Liquéfier… Vanishing Point… Point de fuite… Blur Flou @@ -999,8 +999,8 @@ Load Settings… Charger les paramètres… Save these settings as a Camera Raw .xmp file Enregistrer ces paramètres dans un fichier .xmp Camera Raw Load settings from a Camera Raw .xmp file Charger les paramètres d’un fichier .xmp Camera Raw - Loaded Camera Raw settings from {file} Paramètres Camera Raw chargés depuis {file} - Loaded Camera Raw settings from {file} ({n} not supported) Paramètres Camera Raw chargés depuis {file} ({n} non pris en charge) + Loaded RAW Develop settings from {file} Paramètres Développement RAW chargés depuis {file} + Loaded RAW Develop settings from {file} ({n} not supported) Paramètres Développement RAW chargés depuis {file} ({n} non pris en charge) Begin recording Démarrer l'enregistrement Bend: Courbure : Bicubic Bicubique @@ -1028,7 +1028,7 @@ Brush Reconstruct Options Options du pinceau de reconstruction Brush Tool Options Options de l'outil Pinceau Cache Level: Niveau de cache : - Camera Raw isn't open Camera Raw n'est pas ouvert + RAW Develop isn't open Développement RAW n'est pas ouvert Cancel Annuler Cancel (Esc) Annuler (Échap) Manage submitted jobs in the system print queue Gérer les tâches soumises dans la file d’impression du système @@ -1990,7 +1990,7 @@ Brush preview color Couleur de l'aperçu du pinceau Cache levels Niveaux de cache Cache tile size Taille des tuiles du cache - Camera Raw Defaults Valeurs par défaut de Camera Raw + RAW Defaults Valeurs par défaut RAW Canvas border Bordure du canevas Show canvas dots Afficher les points du canevas Clip thumbnails to layer bounds Rogner les vignettes aux limites du calque @@ -2077,7 +2077,6 @@ Never Jamais Normal tip Pointe normale Open as smart object Ouvrir en tant qu'objet intelligent - Open in camera raw Ouvrir dans Camera Raw Open documents as tabs Ouvrir les documents dans des onglets Overscroll Défilement au-delà des bords Performance Performances @@ -2481,8 +2480,6 @@ Roman Hanging Punctuation Ponctuation latine hors justification Avoid Widows/Orphans Éviter les veuves et orphelines Compose Composition - Adobe Single-line Composer Composeur ligne par ligne Adobe - Adobe Every-line Composer Composeur multiligne Adobe Justification Justification Word Spacing Espacement des mots Letter Spacing Espacement des lettres @@ -2737,7 +2734,6 @@ Intersect with Intersection avec Capture Comp Capturer la composition No Layer Comps Aucune composition de calques - Adobe PDF Presets… Préréglages Adobe PDF… 3D… 3D… Technology Previews… Aperçus technologiques… Background from Layer Arrière-plan d'après le calque @@ -2828,8 +2824,8 @@ Tone Histogram Histogramme des tons Show Selected Region Afficher la zone sélectionnée cameraRaw Light Lumière - Camera Raw Filter ({layer}) Filtre Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtre Développement RAW ({layer}) + RAW Develop ({name}) Développement RAW ({name}) cameraRaw Lights Tons clairs cameraRaw Darks Tons sombres cameraRaw Blacks Noirs @@ -3512,7 +3508,6 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Adwaita (Dark) Adwaita (sombre) Adwaita (Light) Adwaita (clair) After Après - All shortcuts reset to Photoshop defaults. Tous les raccourcis ont été réinitialisés aux valeurs par défaut de Photoshop. Ambience Ambiance Ambient Ambiante Amplitude Max Amplitude max. @@ -3588,8 +3583,8 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Brush Type Type de pinceau Burlap Toile de jute Calculations Calculs - Camera Raw Camera Raw - Camera Raw Filter Filtre Camera Raw + RAW Develop Développement RAW + RAW Develop Filter Filtre Développement RAW Cancel transform Annuler la transformation Candle Light Bougie Canvas Size Taille du canevas @@ -3698,7 +3693,6 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Deep Yellow Jaune profond Default Foreground and Background Colors Couleurs par défaut du premier plan et de l'arrière-plan Default Leaves Feuilles par défaut - Default Photoshop Size Taille Photoshop par défaut Defaults Valeurs par défaut Define Brush Preset Définir un préréglage de pinceau Define Custom Shape Définir une forme personnalisée @@ -4641,7 +4635,7 @@ shape Appearance Apparence Show layer bounds on hover Afficher les limites du calque au survol Expand layer group on click Développer le groupe de calques au clic Show hover bounds from Layers Afficher les limites au survol depuis Calques - Saved Camera Raw settings to {file} Réglages Camera Raw enregistrés dans {file} + Saved RAW Develop settings to {file} Réglages Développement RAW enregistrés dans {file} Save the settings to each raw's sidecar without opening it Enregistrer les réglages dans le fichier annexe de chaque raw sans l’ouvrir No settings saved: these raws can't keep a sidecar here Rien n’a été enregistré : ces raw ne peuvent pas avoir de fichier annexe ici Some settings could not be saved; the raws stay open Certains réglages n’ont pas pu être enregistrés ; les raw restent ouverts diff --git a/crates/ui-egui/src/i18n/he.tsv b/crates/ui-egui/src/i18n/he.tsv index c8f682bf39..8b58e34c6c 100644 --- a/crates/ui-egui/src/i18n/he.tsv +++ b/crates/ui-egui/src/i18n/he.tsv @@ -224,7 +224,7 @@ Plug-ins… תוספים… Type… טקסט… Enhanced Controls… פקדים משופרים… - Camera Raw… Camera Raw… + RAW Defaults… ברירות מחדל RAW… Raw Defaults… ברירות מחדל ל-Raw… Integrations… שילובים… AI Integrations… שילובי בינה מלאכותית… @@ -554,7 +554,7 @@ Last Filter המסנן האחרון Filter Gallery… גלריית מסננים… Adaptive Wide Angle… זווית רחבה אדפטיבית… - Camera Raw Filter… מסנן Camera Raw… + RAW Develop Filter… מסנן פיתוח RAW… Liquify… נזילות… Vanishing Point… נקודת היעלמות… Blur טשטוש @@ -902,8 +902,8 @@ Load Settings… טען הגדרות… Save these settings as a Camera Raw .xmp file שמור הגדרות אלה כקובץ ‎.xmp של Camera Raw Load settings from a Camera Raw .xmp file טען הגדרות מקובץ ‎.xmp של Camera Raw - Loaded Camera Raw settings from {file} נטענו הגדרות Camera Raw מתוך {file} - Loaded Camera Raw settings from {file} ({n} not supported) נטענו הגדרות Camera Raw מתוך {file} ({n} לא נתמכות) + Loaded RAW Develop settings from {file} נטענו הגדרות פיתוח RAW מתוך {file} + Loaded RAW Develop settings from {file} ({n} not supported) נטענו הגדרות פיתוח RAW מתוך {file} ({n} לא נתמכות) Begin recording התחל הקלטה Bend: כיפוף: Bicubic דו-מעוקב (Bicubic) @@ -931,7 +931,7 @@ Brush Reconstruct Options אפשרויות שחזור מברשת Brush Tool Options אפשרויות כלי מברשת Cache Level: רמת מטמון: - Camera Raw isn't open Camera Raw אינו פתוח + RAW Develop isn't open פיתוח RAW אינו פתוח Cancel ביטול Cancel (Esc) ביטול (Esc) Manage submitted jobs in the system print queue נהל עבודות שנשלחו בתור ההדפסה של המערכת @@ -1902,7 +1902,7 @@ Brush preview color צבע תצוגה מקדימה של מברשת Cache levels רמות מטמון Cache tile size גודל אריח מטמון - Camera Raw Defaults ברירות מחדל של Camera Raw + RAW Defaults ברירות מחדל RAW Canvas border גבול קנבס Show canvas dots הצג נקודות קנבס Clip thumbnails to layer bounds גזור תמונות ממוזערות לגבולות השכבה @@ -1984,7 +1984,6 @@ Never לעולם לא Normal tip קצה רגיל Open as smart object פתח כאובייקט חכם - Open in camera raw פתח ב-Camera Raw Open documents as tabs פתח מסמכים כלשוניות Overscroll גלילת יתר Performance ביצועים @@ -2345,8 +2344,8 @@ Tone Histogram היסטוגרמת גוון Show Selected Region הצג אזור נבחר cameraRaw Light אור - Camera Raw Filter ({layer}) מסנן Camera Raw ‏({layer}) - Camera Raw ({name}) Camera Raw ‏({name}) + RAW Develop Filter ({layer}) מסנן פיתוח RAW ‏({layer}) + RAW Develop ({name}) פיתוח RAW ‏({name}) cameraRaw Lights בהירים cameraRaw Darks כהים cameraRaw Red אדום @@ -2943,8 +2942,6 @@ curves Smooth החלק Roman Hanging Punctuation פיסוק תלוי רומי Avoid Widows/Orphans הימנע משורות יתומות/אלמנות Compose הרכב - Adobe Single-line Composer מרכיב שורה בודדת של Adobe - Adobe Every-line Composer מרכיב כל השורות של Adobe Word Spacing ריווח מילים Letter Spacing ריווח אותיות Glyph Scaling שינוי קנה מידה של גליפים @@ -3140,7 +3137,6 @@ curves Smooth החלק Intersect with חתוך עם Capture Comp לכוד קומפ No Layer Comps אין קומפים של שכבות - Adobe PDF Presets… ערכות PDF של Adobe… 3D… 3D… Technology Previews… תצוגות מקדימות של טכנולוגיה… Add a mask (from the selection; ⌥ inverts) הוסף מסכה (מהבחירה; ⌥ הופך) @@ -3757,8 +3753,8 @@ layerLabel No Color בלי צבע Border גבול Box Blur טשטוש קופסה Calculations חישובים - Camera Raw Camera Raw - Camera Raw Filter מסנן Camera Raw + RAW Develop פיתוח RAW + RAW Develop Filter מסנן פיתוח RAW Channel1 ערוץ1 Channel2 ערוץ2 Channel3 ערוץ3 @@ -4572,3 +4568,6 @@ navigator Zoom תקריב @plural {n} action file loaded|{n} action files loaded נטען {n} קובץ פעולות|נטענו {n} קובצי פעולות @plural {n} file could not be loaded: {errors}|{n} files could not be loaded: {errors} לא ניתן היה לטעון {n} קובץ: {errors}|לא ניתן היה לטעון {n} קבצים: {errors} @plural {what}: {n} Image Assets output failed|{what}: {n} Image Assets outputs failed {what}: {n} פלט נכסי תמונה נכשל|{what}: {n} פלטי נכסי תמונה נכשלו + +# RAW Develop feature labels + Saved RAW Develop settings to {file} הגדרות פיתוח RAW נשמרו ב־{file} diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 2dd564c1cf..1f5871b96e 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -40,7 +40,7 @@ # Tool and Scope strings -# Camera Raw +# RAW Develop # Coverage-test keys (English until translated) @@ -357,8 +357,8 @@ Impressionist प्रभाववादी Aligned संरेखित Fit in View दृश्य में फ़िट करें - Camera Raw Camera Raw - Camera Raw… Camera Raw… + RAW Develop RAW डेवलप + RAW Defaults… RAW डिफ़ॉल्ट… cameraRaw Amount मात्रा Amount मात्रा cameraRaw Aqua एक्वा @@ -373,11 +373,11 @@ cameraRaw Blending मिश्रण Blending मिश्रण cameraRaw Blue नीला Blue नीला -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw फ़िल्टर ({layer}) - Camera Raw Filter ({layer}) Camera Raw फ़िल्टर ({layer}) -cameraRaw Camera Raw isn't open Camera Raw खुला नहीं है - Camera Raw isn't open Camera Raw खुला नहीं है +cameraRaw RAW Develop ({name}) RAW डेवलप ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW डेवलप फ़िल्टर ({layer}) + RAW Develop Filter ({layer}) RAW डेवलप फ़िल्टर ({layer}) +cameraRaw RAW Develop isn't open RAW डेवलप खुला नहीं है + RAW Develop isn't open RAW डेवलप खुला नहीं है cameraRaw Cancel रद्द करें cameraRaw Canceled opening {name} {name} खोलना रद्द किया गया Canceled opening {name} {name} खोलना रद्द किया गया @@ -436,8 +436,8 @@ cameraRaw Load Settings… सेटिंग्स लोड करें… Load Settings… सेटिंग्स लोड करें… cameraRaw Load settings from a Camera Raw .xmp file Camera Raw .xmp फ़ाइल से सेटिंग्स लोड करें Load settings from a Camera Raw .xmp file Camera Raw .xmp फ़ाइल से सेटिंग्स लोड करें -cameraRaw Loaded Camera Raw settings from {file} {file} से Camera Raw सेटिंग्स लोड की गईं - Loaded Camera Raw settings from {file} {file} से Camera Raw सेटिंग्स लोड की गईं +cameraRaw Loaded RAW Develop settings from {file} {file} से RAW डेवलप सेटिंग्स लोड की गईं + Loaded RAW Develop settings from {file} {file} से RAW डेवलप सेटिंग्स लोड की गईं cameraRaw Luminance लुमिनेंस Luminance लुमिनेंस cameraRaw Luminance Detail लुमिनेंस डिटेल @@ -693,3 +693,10 @@ cameraRaw Yellow पीला Auto-size Canvas कैनवास का आकार स्वचालित रूप से बदलें Keep Relative Position During Layer Reordering लेयर्स का क्रम बदलते समय सापेक्ष स्थिति बनाए रखें Shrinkwrap Canvas on Save सहेजते समय कैनवास को सामग्री के अनुसार छोटा करें + RAW Defaults RAW डिफ़ॉल्ट + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW डेवलप सेटिंग्स {file} में सहेजी गईं + RAW Develop Filter RAW डेवलप फ़िल्टर + RAW Develop Filter… RAW डेवलप फ़िल्टर… + Loaded RAW Develop settings from {file} ({n} not supported) {file} से RAW डेवलप सेटिंग्स लोड की गईं ({n} समर्थित नहीं) diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 7b5aa7c44d..54078a6d01 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -34,7 +34,7 @@ # Adjustments and filters -# Camera Raw and camera data +# RAW Develop and camera data # Dialogs, preferences and file formats @@ -544,7 +544,7 @@ Brush Settings Ecsetbeállítások Brushes Ecsetek brushes ecsetek - Camera Raw Filter… Camera Raw szűrő… + RAW Develop Filter… RAW-előhívás szűrő… Canvas Guides Vászon-segédvonalak Cascade Lépcsőzetes Change Panel Group Panelcsoport váltása @@ -2573,11 +2573,11 @@ navigator Zoom Nagyítás mértéke Balance Egyensúly Before (Y) Előtte (Y) Blending Keverés - Camera Raw Camera Raw - Camera Raw ({name}) Camera Raw ({name}) - Camera Raw Filter Camera Raw szűrő - Camera Raw Filter ({layer}) Camera Raw szűrő ({layer}) - Camera Raw isn't open A Camera Raw nincs megnyitva + RAW Develop RAW-előhívás + RAW Develop ({name}) RAW-előhívás ({name}) + RAW Develop Filter RAW-előhívás szűrő + RAW Develop Filter ({layer}) RAW-előhívás szűrő ({layer}) + RAW Develop isn't open A RAW-előhívás nincs megnyitva Canceled opening {name} Megnyitás megszakítva: {name} Damaged Photoshop document Sérült Photoshop-dokumentum The document “{name}” may be damaged. A(z) „{name}” dokumentum sérült lehet. @@ -2630,7 +2630,6 @@ navigator Zoom Nagyítás mértéke Noise Luminance Zajcsökkentés: luminancia Noise Luminance Detail Zajcsökkentés: luminancia-részletesség Noise Reduction Zajcsökkentés - Open in camera raw Megnyitás a Camera Raw-ban Paint Overlay Ráfestés Previous Előző Purple Lila @@ -3188,8 +3187,8 @@ cameraRaw Yellow Sárga Cache levels Gyorsítótár-szintek Cache tile size Gyorsítótár csempemérete Camera Data Fényképezőgép adatai - Camera Raw Defaults Camera Raw-alapértékek - Camera Raw… Camera Raw… + RAW Defaults RAW-alapértékek + RAW Defaults… RAW-alapértékek… Cancel opening Megnyitás megszakítása Canvas border Vászonszegély Canvas extension color: Vászonbővítés színe: @@ -3779,9 +3778,6 @@ cameraRaw Yellow Sárga Add to selection (⇧) Hozzáadás a kijelöléshez (⇧) Adds grain to the soft edges of the brush tip. Szemcsézettséget ad az ecsethegy lágy széleihez. Adjustment Layers Korrekciós rétegek - Adobe Every-line Composer Adobe többsoros szedőmotor - Adobe PDF Presets… Adobe PDF-előbeállítások… - Adobe Single-line Composer Adobe egysoros szedőmotor Advanced Controls Speciális vezérlők After (X) Utána (X) Airbrush: keeps painting while the pointer rests. Festékszóró: a festés akkor is folytatódik, amikor a mutató áll. @@ -4193,8 +4189,8 @@ cameraRaw Yellow Sárga Load Settings… Beállítások betöltése… Save these settings as a Camera Raw .xmp file A beállítások mentése Camera Raw .xmp-fájlként Load settings from a Camera Raw .xmp file Beállítások betöltése Camera Raw .xmp-fájlból - Loaded Camera Raw settings from {file} Camera Raw-beállítások betöltve innen: {file} - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw-beállítások betöltve innen: {file} ({n} nem támogatott) + Loaded RAW Develop settings from {file} RAW-előhívás-beállítások betöltve innen: {file} + Loaded RAW Develop settings from {file} ({n} not supported) RAW-előhívás-beállítások betöltve innen: {file} ({n} nem támogatott) Auto Add/Delete Automatikus hozzáadás/törlés Don't also tick Mirror Image in Print Settings…: the two flips cancel out. A nyomtatási beállításokban ne jelöld be a tükrözést is: a két tükrözés kioltja egymást. Print Settings… Nyomtatási beállítások… @@ -4525,7 +4521,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Réteghatárok megjelenítése rámutatáskor Expand layer group on click Rétegcsoport kibontása kattintásra Show hover bounds from Layers Határok megjelenítése a Rétegek panelről rámutatáskor - Saved Camera Raw settings to {file} Camera Raw-beállítások mentve ide: {file} + Saved RAW Develop settings to {file} RAW-előhívás-beállítások mentve ide: {file} Save the settings to each raw's sidecar without opening it A beállítások mentése minden raw kísérőfájljába megnyitás nélkül No settings saved: these raws can't keep a sidecar here Nincs mentve semmi: ezek a raw fájlok itt nem kaphatnak kísérőfájlt Some settings could not be saved; the raws stay open Néhány beállítást nem sikerült menteni; a raw fájlok nyitva maradnak diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index eeb501d925..a4ebf1d3cf 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -29,7 +29,7 @@ # Gradient Editor window, opened from the options bar's gradient swatch. -# Labels added on main after this catalog (depth labels, Wayland drop, profiles, Camera Raw, Patch tool, rendering mode) +# Labels added on main after this catalog (depth labels, Wayland drop, profiles, RAW Develop, Patch tool, rendering mode) # Warp grid presets (#388) @@ -319,7 +319,7 @@ Plugins… Plug-in… Type… Teks… Enhanced Controls… Kontrol Lanjutan… - Camera Raw… Camera Raw… + RAW Defaults… Default RAW… Raw Defaults… Default Raw… Integrations… Integrasi… AI Integrations… Integrasi AI… @@ -640,7 +640,7 @@ Last Filter Filter Terakhir Filter Gallery… Galeri Filter… Adaptive Wide Angle… Adaptive Wide Angle… - Camera Raw Filter… Filter Camera Raw… + RAW Develop Filter… Filter Pengembangan RAW… Liquify… Liquify… Vanishing Point… Vanishing Point… Blur Blur @@ -1010,8 +1010,8 @@ Load Settings… Muat Pengaturan… Save these settings as a Camera Raw .xmp file Simpan pengaturan ini sebagai berkas .xmp Camera Raw Load settings from a Camera Raw .xmp file Muat pengaturan dari berkas .xmp Camera Raw - Loaded Camera Raw settings from {file} Pengaturan Camera Raw dimuat dari {file} - Loaded Camera Raw settings from {file} ({n} not supported) Pengaturan Camera Raw dimuat dari {file} ({n} tidak didukung) + Loaded RAW Develop settings from {file} Pengaturan Pengembangan RAW dimuat dari {file} + Loaded RAW Develop settings from {file} ({n} not supported) Pengaturan Pengembangan RAW dimuat dari {file} ({n} tidak didukung) Begin recording Mulai merekam Bend: Lengkung: Bicubic Bicubic @@ -1039,7 +1039,7 @@ Brush Reconstruct Options Opsi Rekonstruksi Kuas Brush Tool Options Opsi Alat Kuas Cache Level: Level Cache: - Camera Raw isn't open Camera Raw tidak terbuka + RAW Develop isn't open Pengembangan RAW tidak terbuka Cancel Batal Cancel (Esc) Batal (Esc) Manage submitted jobs in the system print queue Kelola pekerjaan yang dikirim dalam antrean cetak sistem @@ -2001,7 +2001,7 @@ Brush preview color Warna pratinjau kuas Cache levels Level cache Cache tile size Ukuran tile cache - Camera Raw Defaults Default Camera Raw + RAW Defaults Default RAW Canvas border Border kanvas Show canvas dots Tampilkan titik kanvas Clip thumbnails to layer bounds Pangkas thumbnail ke batas layer @@ -2088,7 +2088,6 @@ Never Tidak pernah Normal tip Ujung normal Open as smart object Buka sebagai smart object - Open in camera raw Buka di Camera Raw Open documents as tabs Buka dokumen sebagai tab Overscroll Overscroll Performance Performa @@ -2489,8 +2488,6 @@ Roman Hanging Punctuation Tanda Baca Menggantung Roman Avoid Widows/Orphans Hindari Widow/Orphan Compose Komposisi - Adobe Single-line Composer Adobe Single-line Composer - Adobe Every-line Composer Adobe Every-line Composer Justification Justifikasi Word Spacing Spasi Kata Letter Spacing Spasi Huruf @@ -2745,7 +2742,6 @@ Intersect with Irisan dengan Capture Comp Tangkap Comp No Layer Comps Tidak Ada Layer Comp - Adobe PDF Presets… Preset Adobe PDF… 3D… 3D… Technology Previews… Pratinjau Teknologi… Background from Layer Background dari Layer @@ -2821,8 +2817,8 @@ Tone Histogram Histogram Nada Show Selected Region Tampilkan Wilayah Terpilih cameraRaw Light Cahaya - Camera Raw Filter ({layer}) Filter Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filter Pengembangan RAW ({layer}) + RAW Develop ({name}) Pengembangan RAW ({name}) cameraRaw Lights Nada Terang cameraRaw Darks Nada Gelap cameraRaw Blacks Hitam @@ -3641,7 +3637,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Tampilkan batas layer saat kursor di atasnya Expand layer group on click Perluas grup layer saat diklik Show hover bounds from Layers Tampilkan batas saat kursor di atas dari Layer - Saved Camera Raw settings to {file} Pengaturan Camera Raw disimpan ke {file} + Saved RAW Develop settings to {file} Pengaturan Pengembangan RAW disimpan ke {file} Save the settings to each raw's sidecar without opening it Simpan pengaturan ke file sidecar setiap raw tanpa membukanya No settings saved: these raws can't keep a sidecar here Tidak ada yang disimpan: raw ini tidak dapat memiliki file sidecar di sini Some settings could not be saved; the raws stay open Beberapa pengaturan tidak dapat disimpan; raw tetap terbuka @@ -3653,3 +3649,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Auto-size Canvas Ubah ukuran kanvas otomatis Keep Relative Position During Layer Reordering Pertahankan posisi relatif saat mengurutkan ulang layer Shrinkwrap Canvas on Save Kecilkan kanvas sesuai konten saat menyimpan + +# RAW Develop feature labels + RAW Develop Pengembangan RAW + RAW Develop Filter Filter Pengembangan RAW diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index d96103379e..099e53c102 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -49,7 +49,7 @@ -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title # Strings added on main after this catalog was written (2026-10). @@ -93,7 +93,7 @@ # Counted status messages and labels (#3454; adapted from PR #3821) # View › Guides › New Guide… › Color -# Dynamic labels (filter and adjustment parameters, Camera Raw, panels, dialogs) that the +# Dynamic labels (filter and adjustment parameters, RAW Develop, panels, dialogs) that the # other catalogs already translate # Path, channel, layer style, status and System Info labels the Czech catalog added @@ -111,7 +111,7 @@ # Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2) # Bevel & Emboss Technique. -# Color management, Liquify, glyph group, warp and Camera Raw labels the Serbian, Vietnamese and Japanese catalogs added +# Color management, Liquify, glyph group, warp and RAW Develop labels the Serbian, Vietnamese and Japanese catalogs added # Shortcut commands, find and replace, profile prompts and metadata labels the German, Hungarian and Serbian catalogs added # View › Guides › right-click a guide @@ -342,7 +342,7 @@ Plugins… Plug-in… Type… Testo… Enhanced Controls… Controlli avanzati… - Camera Raw… Camera Raw… + RAW Defaults… Predefiniti RAW… Raw Defaults… Predefiniti Raw… Integrations… Integrazioni… AI Integrations… Integrazioni IA… @@ -674,7 +674,7 @@ Last Filter Ultimo filtro Filter Gallery… Galleria filtri… Adaptive Wide Angle… Grandangolo adattivo… - Camera Raw Filter… Filtro Camera Raw… + RAW Develop Filter… Filtro Sviluppo RAW… Liquify… Fluidifica… Vanishing Point… Punto di fuga… Blur Sfocatura @@ -1026,8 +1026,8 @@ Load Settings… Carica impostazioni… Save these settings as a Camera Raw .xmp file Salva queste impostazioni come file .xmp di Camera Raw Load settings from a Camera Raw .xmp file Carica le impostazioni da un file .xmp di Camera Raw - Loaded Camera Raw settings from {file} Impostazioni Camera Raw caricate da {file} - Loaded Camera Raw settings from {file} ({n} not supported) Impostazioni Camera Raw caricate da {file} ({n} non supportate) + Loaded RAW Develop settings from {file} Impostazioni Sviluppo RAW caricate da {file} + Loaded RAW Develop settings from {file} ({n} not supported) Impostazioni Sviluppo RAW caricate da {file} ({n} non supportate) Begin recording Inizia registrazione Bend: Curvatura: Bicubic Bicubica @@ -1055,7 +1055,7 @@ Brush Reconstruct Options Opzioni ricostruzione pennello Brush Tool Options Opzioni strumento Pennello Cache Level: Livello cache: - Camera Raw isn't open Camera Raw non è aperto + RAW Develop isn't open Sviluppo RAW non è aperto Cancel Annulla Reset Ripristina Cancel (Esc) Annulla (Esc) @@ -2029,7 +2029,7 @@ Brush preview color Colore anteprima pennello Cache levels Livelli cache Cache tile size Dimensione tile cache - Camera Raw Defaults Predefiniti Camera Raw + RAW Defaults Predefiniti RAW Canvas border Bordo quadro Show canvas dots Mostra punti del quadro Clip thumbnails to layer bounds Ritaglia le miniature ai limiti del livello @@ -2116,7 +2116,6 @@ Never Mai Normal tip Punta normale Open as smart object Apri come oggetto avanzato - Open in camera raw Apri in Camera Raw Open documents as tabs Apri documenti come schede Overscroll Overscroll Performance Prestazioni @@ -2480,8 +2479,8 @@ Tone Histogram Istogramma tonale Show Selected Region Mostra regione selezionata cameraRaw Light Luce - Camera Raw Filter ({layer}) Filtro Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtro Sviluppo RAW ({layer}) + RAW Develop ({name}) Sviluppo RAW ({name}) cameraRaw Lights Toni chiari cameraRaw Darks Toni scuri cameraRaw Red Rossi @@ -3061,8 +3060,6 @@ curves Smooth Leviga Roman Hanging Punctuation Punteggiatura latina sospesa Avoid Widows/Orphans Evita righe vedove/orfane Compose Composizione - Adobe Single-line Composer Compositore riga singola Adobe - Adobe Every-line Composer Compositore ogni riga Adobe Word Spacing Spaziatura parole Letter Spacing Spaziatura lettere Glyph Scaling Ridimensionamento glifi @@ -3259,7 +3256,6 @@ curves Smooth Leviga Intersect with Interseca con Capture Comp Acquisisci composizione No Layer Comps Nessuna composizione livelli - Adobe PDF Presets… Predefiniti Adobe PDF… 3D… 3D… Technology Previews… Anteprime tecnologiche… Add a mask (from the selection; ⌥ inverts) Aggiungi una maschera (dalla selezione; ⌥ inverte) @@ -3899,8 +3895,8 @@ layerLabel No Color Nessun colore Border Bordo Box Blur Sfocatura casella Calculations Calcoli - Camera Raw Camera Raw - Camera Raw Filter Filtro Camera Raw + RAW Develop Sviluppo RAW + RAW Develop Filter Filtro Sviluppo RAW Channel1 Canale 1 Channel2 Canale 2 Channel3 Canale 3 @@ -4343,7 +4339,6 @@ navigator Zoom Zoom Do not append "copy" to filename when saving a copy Non aggiungere "copy" al nome del file quando si salva una copia Save Full-Size Composite in .pcraft Files Salva l'immagine composita a dimensione piena nei file .pcraft Adobe-rgb-compat Adobe RGB (compatibile) - All shortcuts reset to Photoshop defaults. Tutte le scorciatoie ripristinate ai predefiniti di Photoshop. Arc Lower Arco inferiore Arc Upper Arco superiore Arrows Frecce @@ -4360,7 +4355,6 @@ navigator Zoom Zoom Convert Converti Currency Valute Cyrillic Cirillico - Default Photoshop Size Dimensione predefinita di Photoshop Display-p3 Display P3 Drag a crop box · drag inside to move · edges resize ({ratio} ratio, {centre} centre) · Space moves while drawing · {commit} commits · Esc cancels Trascina un riquadro ritaglio · trascina dentro per spostare · bordi ridimensionano ({ratio} proporzione, {centre} centro) · Spazio sposta durante disegno · {commit} conferma · Esc annulla Drag: draw freehand · Release on the start point: close Trascina: disegna a mano libera · Rilascia sul punto iniziale: chiudi @@ -4717,7 +4711,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Mostra i limiti del livello al passaggio del mouse Expand layer group on click Espandi il gruppo di livelli al clic Show hover bounds from Layers Mostra i limiti al passaggio dal pannello Livelli - Saved Camera Raw settings to {file} Impostazioni Camera Raw salvate in {file} + Saved RAW Develop settings to {file} Impostazioni Sviluppo RAW salvate in {file} Save the settings to each raw's sidecar without opening it Salva le impostazioni nel file sidecar di ogni raw senza aprirlo No settings saved: these raws can't keep a sidecar here Nulla salvato: questi raw non possono avere un file sidecar qui Some settings could not be saved; the raws stay open Alcune impostazioni non sono state salvate; i raw restano aperti diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 061a52950b..068537833b 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -42,7 +42,7 @@ # Strings added to the UI after this catalog was first written (rebase onto main, 2026-10). # Gradient Editor window, opened from the options bar's gradient swatch. # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title @@ -352,7 +352,7 @@ Plugins… プラグイン… Type… 文字… Enhanced Controls… 拡張コントロール… - Camera Raw… Camera Raw… + RAW Defaults… RAWの既定値… Raw Defaults… RAW の既定値… Integrations… 連携… AI Integrations… AI 連携… @@ -686,7 +686,7 @@ Last Filter 直前のフィルター Filter Gallery… フィルターギャラリー… Adaptive Wide Angle… 広角補正… - Camera Raw Filter… Camera Raw フィルター… + RAW Develop Filter… RAW現像 フィルター… Liquify… ゆがみ… Vanishing Point… 消点… Blur ぼかし @@ -1041,8 +1041,8 @@ Load Settings… 設定を読み込み… Save these settings as a Camera Raw .xmp file この設定を Camera Raw の .xmp ファイルとして保存 Load settings from a Camera Raw .xmp file Camera Raw の .xmp ファイルから設定を読み込む - Loaded Camera Raw settings from {file} {file} から Camera Raw の設定を読み込みました - Loaded Camera Raw settings from {file} ({n} not supported) {file} から Camera Raw の設定を読み込みました(未対応: {n}) + Loaded RAW Develop settings from {file} {file} から RAW現像 の設定を読み込みました + Loaded RAW Develop settings from {file} ({n} not supported) {file} から RAW現像 の設定を読み込みました(未対応: {n}) Begin recording 記録を開始 Bend: 曲げ: Bicubic バイキュービック @@ -1070,7 +1070,7 @@ Brush Reconstruct Options ブラシの復元オプション Brush Tool Options ブラシツールのオプション Cache Level: キャッシュレベル: - Camera Raw isn't open Camera Raw は開いていません + RAW Develop isn't open RAW現像 は開いていません Cancel キャンセル Cancel (Esc) キャンセル(Esc) Manage submitted jobs in the system print queue 送信済みのジョブはシステムの印刷キューで管理してください @@ -2040,7 +2040,7 @@ Brush preview color ブラシプレビューの色 Cache levels キャッシュレベル Cache tile size キャッシュタイルのサイズ - Camera Raw Defaults Camera Raw の既定値 + RAW Defaults RAWの既定値 Canvas border カンバスの境界 Show canvas dots カンバスのドットを表示 Clip thumbnails to layer bounds サムネールをレイヤーの境界でクリップ @@ -2127,7 +2127,6 @@ Never しない Normal tip 通常の先端 Open as smart object スマートオブジェクトとして開く - Open in camera raw Camera Raw で開く Open documents as tabs ドキュメントをタブで開く Overscroll オーバースクロール Performance パフォーマンス @@ -2403,8 +2402,8 @@ Tone Histogram 階調ヒストグラム Show Selected Region 選択範囲を表示 cameraRaw Light ライト - Camera Raw Filter ({layer}) Camera Raw フィルター ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW現像 フィルター ({layer}) + RAW Develop ({name}) RAW現像 ({name}) cameraRaw Lights 明部 cameraRaw Blending ブレンド cameraRaw Blacks 黒レベル @@ -2974,7 +2973,7 @@ fontWeight Italic 斜体 Box Blur ぼかし (ボックス) Bulge 膨らみ Burn 焼き込み - Camera Raw Filter Camera Raw フィルター + RAW Develop Filter RAW現像 フィルター Canvas Size カンバスサイズ Circularity 真円度 Clipping Path クリッピングパス @@ -3159,7 +3158,7 @@ fontWeight Italic 斜体 Border 境界 Browse 参照 Calculations 演算 - Camera Raw Camera Raw + RAW Develop RAW現像 Caption キャプション Category カテゴリー Channel チャンネル @@ -3345,10 +3344,7 @@ fontWeight Italic 斜体 Add to selection (⇧) 選択範囲に追加 (⇧) Adds grain to the soft edges of the brush tip. ブラシ先端の柔らかい縁に粒子を加えます。 Adjustment Layer 色調補正レイヤー - Adobe Every-line Composer Adobe 全行コンポーザー - Adobe PDF Presets… Adobe PDF プリセット… Adobe RGB (1998) Adobe RGB (1998) - Adobe Single-line Composer Adobe 1 行コンポーザー Advanced Controls 詳細コントロール After (X) 後 (X) Airbrush: keeps painting while the pointer rests. エアブラシ: ポインターを止めている間も描き続けます。 @@ -4289,7 +4285,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover ホバー時にレイヤーの境界を表示 Expand layer group on click クリックでレイヤーグループを展開 Show hover bounds from Layers レイヤーパネルからのホバー境界を表示 - Saved Camera Raw settings to {file} Camera Raw の設定を {file} に保存しました + Saved RAW Develop settings to {file} RAW現像 の設定を {file} に保存しました Save the settings to each raw's sidecar without opening it 各 Raw のサイドカーファイルに設定を保存し、開かずに閉じます No settings saved: these raws can't keep a sidecar here 保存されませんでした:これらの Raw にはここでサイドカーファイルを作成できません Some settings could not be saved; the raws stay open 一部の設定を保存できませんでした。Raw は開いたままです diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index c5085bc9f7..2927c4b009 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -195,7 +195,7 @@ Plug-ins… პლაგინები… Type… ტექსტი… Enhanced Controls… გაუმჯობესებული მართვის ელემენტები… - Camera Raw… Camera Raw… + RAW Defaults… RAW-ის ნაგულისხმევი პარამეტრები… Raw Defaults… Raw-ის ნაგულისხმევი პარამეტრები… Integrations… ინტეგრაციები… AI Integrations… AI ინტეგრაციები… @@ -507,7 +507,7 @@ Last Filter ბოლო ფილტრი Filter Gallery… ფილტრების გალერეა… Adaptive Wide Angle… ადაპტიური ფართოკუთხა… - Camera Raw Filter… Camera Raw ფილტრი… + RAW Develop Filter… RAW დამუშავება ფილტრი… Liquify… გათხევადება… Vanishing Point… გაქრობის წერტილი… Blur გაბუნდოვნება @@ -857,7 +857,7 @@ Brush Reconstruct Options ფუნჯით აღდგენის პარამეტრები Brush Tool Options ფუნჯის ხელსაწყოს პარამეტრები Cache Level: ქეშის დონე: - Camera Raw isn't open Camera Raw არ არის გახსნილი + RAW Develop isn't open RAW დამუშავება არ არის გახსნილი Cancel გაუქმება Cancel (Esc) გაუქმება (Esc) Cancel any current edits (Esc) მიმდინარე ცვლილებების გაუქმება (Esc) @@ -1811,7 +1811,7 @@ Brush preview color ფუნჯის წინასწარი ნახვის ფერი Cache levels ქეშის დონეები Cache tile size ქეშის ფილის ზომა - Camera Raw Defaults Camera Raw-ის ნაგულისხმევი პარამეტრები + RAW Defaults RAW-ის ნაგულისხმევი პარამეტრები Canvas border ტილოს საზღვარი Show canvas dots ტილოს წერტილების ჩვენება Canvas color ტილოს ფერი @@ -1891,7 +1891,6 @@ Never არასოდეს Normal tip ჩვეულებრივი წვერი Open as smart object ჭკვიან ობიექტად გახსნა - Open in camera raw Camera Raw-ში გახსნა Open documents as tabs დოკუმენტების ჩანართებად გახსნა Overscroll საზღვრებს მიღმა გადახვევა Performance წარმადობა @@ -2276,8 +2275,6 @@ Roman Hanging Punctuation ლათინური გამოწეული პუნქტუაცია Avoid Widows/Orphans ობოლი სტრიქონების თავიდან აცილება Compose აწყობა - Adobe Single-line Composer Adobe-ის სტრიქონის მიხედვით აწყობა - Adobe Every-line Composer Adobe-ის აბზაცის მიხედვით აწყობა Justification სწორება Word Spacing სიტყვებს შორის ინტერვალი Letter Spacing ასოებს შორის ინტერვალი @@ -2530,7 +2527,6 @@ Intersect with გადაკვეთა: Capture Comp კომპოზიციის ჩაწერა No Layer Comps შრეების კომპოზიციები არ არის - Adobe PDF Presets… Adobe PDF-ის პრესეტები… 3D… 3D… Technology Previews… ტექნოლოგიების წინასწარი ვერსიები… Background from Layer ფონი შრიდან @@ -2618,8 +2614,8 @@ Tone Histogram ტონების ჰისტოგრამა Show Selected Region მონიშნული რეგიონის ჩვენება cameraRaw Light სინათლე - Camera Raw Filter ({layer}) Camera Raw ფილტრი ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW დამუშავება ფილტრი ({layer}) + RAW Develop ({name}) RAW დამუშავება ({name}) cameraRaw Lights ნათელი ტონები cameraRaw Darks მუქი ტონები cameraRaw Blacks შავები @@ -3615,8 +3611,8 @@ layerLabel No Color ფერის გარეშე Border საზღვარი Box Blur კვადრატული გაბუნდოვნება Calculations გამოთვლები - Camera Raw Camera Raw - Camera Raw Filter Camera Raw ფილტრი + RAW Develop RAW დამუშავება + RAW Develop Filter RAW დამუშავება ფილტრი Channel1 არხი1 Channel2 არხი2 Channel3 არხი3 @@ -4093,7 +4089,6 @@ shape Appearance იერსახე Add Mask to Selection ნიღბის მონიშნულში დამატება Add Open Files გახსნილი ფაილების დამატება Add to Dictionary ლექსიკონში დამატება - All shortcuts reset to Photoshop defaults. ყველა მალსახმობი დაბრუნდა Photoshop-ის ნაგულისხმევზე. Allow Continue გაგრძელების დაშვება Attempt to Automatically Align Source Images წყაროს გამოსახულებების ავტომატური სწორების მცდელობა Auto Add/Delete ავტომატური დამატება/წაშლა @@ -4114,7 +4109,6 @@ shape Appearance იერსახე Color Indicates: ფერი აღნიშნავს: Copy Texture to Other Tools ტექსტურის სხვა ხელსაწყოებში კოპირება Create Smart Object after Loading Layers შრეების ჩატვირთვის შემდეგ ჭკვიანი ობიექტის შექმნა - Default Photoshop Size Photoshop-ის ნაგულისხმევი ზომა Drag a crop box · drag inside to move · edges resize ({ratio} ratio, {centre} centre) · Space moves while drawing · {commit} commits · Esc cancels გადაათრიეთ ჩამოჭრის ჩარჩო · შიგნით გადათრევით გადაადგილება · კიდეებით ზომის შეცვლა ({ratio} თანაფარდობა, {centre} ცენტრიდან) · Space — გადაადგილება ხაზვისას · {commit} — დადასტურება · Esc — გაუქმება Drag to pan · Scroll to zoom · Double-click to fit გადათრევა: გადაადგილება · გადახვევა: მასშტაბი · ორმაგი დაწკაპუნება: ჩატევა Drag: draw freehand · Release on the start point: close გადათრევა: თავისუფალი ხატვა · გაშვება საწყის წერტილზე: დახურვა @@ -4133,8 +4127,8 @@ shape Appearance იერსახე Load Actions… მოქმედებების ჩატვირთვა… Load Settings… პარამეტრების ჩატვირთვა… Load settings from a Camera Raw .xmp file პარამეტრების ჩატვირთვა Camera Raw-ის .xmp ფაილიდან - Loaded Camera Raw settings from {file} Camera Raw-ის პარამეტრები ჩაიტვირთა {file}-დან - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw-ის პარამეტრები ჩაიტვირთა {file}-დან (მხარდაუჭერელი: {n}) + Loaded RAW Develop settings from {file} RAW დამუშავება-ის პარამეტრები ჩაიტვირთა {file}-დან + Loaded RAW Develop settings from {file} ({n} not supported) RAW დამუშავება-ის პარამეტრები ჩაიტვირთა {file}-დან (მხარდაუჭერელი: {n}) Mask Channel ნიღბის არხი Message: შეტყობინება: No Spelling Suggestions მართლწერის შეთავაზებები არ არის @@ -4595,9 +4589,9 @@ layerLabel Magenta მეწამული @plural {n} document|{n} documents {n} დოკუმენტი @plural {n} pixel|{n} pixels {n} პიქსელი cameraRaw Before (Y) მანამდე (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw ფილტრი ({layer}) -cameraRaw Camera Raw isn't open Camera Raw არ არის გახსნილი +cameraRaw RAW Develop ({name}) RAW დამუშავება ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW დამუშავება ფილტრი ({layer}) +cameraRaw RAW Develop isn't open RAW დამუშავება არ არის გახსნილი cameraRaw Cancel გაუქმება cameraRaw Cancelled opening {name} {name}-ის გახსნა გაუქმდა cameraRaw Cancelled {label} გაუქმდა: {label} @@ -4609,7 +4603,7 @@ cameraRaw Highlight Clipping Warning (O) ღია ტონების მო cameraRaw Highlight Priority ღია ტონების პრიორიტეტი cameraRaw Load Settings… პარამეტრების ჩატვირთვა… cameraRaw Load settings from a Camera Raw .xmp file პარამეტრების ჩატვირთვა Camera Raw-ის .xmp ფაილიდან -cameraRaw Loaded Camera Raw settings from {file} Camera Raw-ის პარამეტრები ჩაიტვირთა {file}-დან +cameraRaw Loaded RAW Develop settings from {file} RAW დამუშავება-ის პარამეტრები ჩაიტვირთა {file}-დან cameraRaw Noise Reduction ხმაურის შემცირება cameraRaw OK OK cameraRaw Open გახსნა @@ -4717,3 +4711,6 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Pick a different document for each channel. თითოეული არხისთვის სხვა დოკუმენტი აირჩიეთ. A picked document is no longer open. ერთ-ერთი არჩეული დოკუმენტი აღარ არის გახსნილი. A picked document is no longer a grayscale document of the same size. ერთ-ერთი არჩეული დოკუმენტი აღარ არის იმავე ზომის ნაცრისფერი ტონების დოკუმენტი. + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW დამუშავების პარამეტრები შენახულია {file}-ში diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 4752f588e4..3ccf990c46 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -323,7 +323,7 @@ Plugins… 플러그인… Type… 문자… Enhanced Controls… 고급 컨트롤… - Camera Raw… Camera Raw… + RAW Defaults… RAW 기본값… Raw Defaults… RAW 기본값… Integrations… 연동… AI Integrations… AI 연동… @@ -651,7 +651,7 @@ Last Filter 마지막 필터 Filter Gallery… 필터 갤러리… Adaptive Wide Angle… 응용 광각… - Camera Raw Filter… Camera Raw 필터… + RAW Develop Filter… RAW 현상 필터… Liquify… 픽셀 유동화… Vanishing Point… 소실점… Blur 흐림 효과 @@ -1011,8 +1011,8 @@ Load Settings… 설정 불러오기… Save these settings as a Camera Raw .xmp file 이 설정을 Camera Raw .xmp 파일로 저장 Load settings from a Camera Raw .xmp file Camera Raw .xmp 파일에서 설정 불러오기 - Loaded Camera Raw settings from {file} {file}에서 Camera Raw 설정을 불러왔습니다 - Loaded Camera Raw settings from {file} ({n} not supported) {file}에서 Camera Raw 설정을 불러왔습니다 (미지원 {n}개) + Loaded RAW Develop settings from {file} {file}에서 RAW 현상 설정을 불러왔습니다 + Loaded RAW Develop settings from {file} ({n} not supported) {file}에서 RAW 현상 설정을 불러왔습니다 (미지원 {n}개) Begin recording 기록 시작 Bend: 구부림: Bicubic 쌍입방 @@ -1040,7 +1040,7 @@ Brush Reconstruct Options 브러시 재구성 옵션 Brush Tool Options 브러시 도구 옵션 Cache Level: 캐시 레벨: - Camera Raw isn't open Camera Raw가 열려 있지 않습니다 + RAW Develop isn't open RAW 현상가 열려 있지 않습니다 Cancel 취소 Reset 재설정 Cancel (Esc) 취소 (Esc) @@ -2014,7 +2014,7 @@ Brush preview color 브러시 미리 보기 색상 Cache levels 캐시 레벨 Cache tile size 캐시 타일 크기 - Camera Raw Defaults Camera Raw 기본값 + RAW Defaults RAW 기본값 Canvas border 캔버스 테두리 Show canvas dots 캔버스 점 표시 Clip thumbnails to layer bounds 썸네일을 레이어 경계로 자르기 @@ -2101,7 +2101,6 @@ Never 안 함 Normal tip 표준 브러시 끝 Open as smart object 스마트 오브젝트로 열기 - Open in camera raw Camera Raw에서 열기 Open documents as tabs 문서를 탭으로 열기 Overscroll 캔버스 밖으로 스크롤 Performance 성능 @@ -2391,8 +2390,8 @@ Tone Histogram 명도 히스토그램 Show Selected Region 선택한 영역 표시 cameraRaw Light 밝게 - Camera Raw Filter ({layer}) Camera Raw 필터 ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW 현상 필터 ({layer}) + RAW Develop ({name}) RAW 현상 ({name}) cameraRaw Lights 밝은 중간 영역 cameraRaw Blending 혼합 cameraRaw Blacks 검정 계열 @@ -2734,7 +2733,7 @@ cameraRaw Color 색상 Color Settings 색상 설정 Assign Profile 프로파일 지정 Convert to Profile 프로파일로 변환 - Camera Raw Camera Raw + RAW Develop RAW 현상 Raw Defaults RAW 기본값 AI Integrations AI 연동 Install Plug-in 플러그인 설치 @@ -2787,7 +2786,7 @@ cameraRaw Color 색상 Save Selection 선택 영역 저장 Filter Gallery 필터 갤러리 Adaptive Wide Angle 응용 광각 - Camera Raw Filter Camera Raw 필터 + RAW Develop Filter RAW 현상 필터 Liquify 픽셀 유동화 Vanishing Point 소실점 Field Blur 필드 흐림 효과 @@ -4191,7 +4190,7 @@ shape Appearance 화면 모양 Show layer bounds on hover 마우스를 올리면 레이어 경계 표시 Expand layer group on click 클릭하면 레이어 그룹 펼치기 Show hover bounds from Layers 레이어 패널에서 마우스를 올릴 때 경계 표시 - Saved Camera Raw settings to {file} Camera Raw 설정을 {file}에 저장했습니다 + Saved RAW Develop settings to {file} RAW 현상 설정을 {file}에 저장했습니다 Save the settings to each raw's sidecar without opening it 각 Raw의 사이드카 파일에 설정을 저장하고 열지 않습니다 No settings saved: these raws can't keep a sidecar here 저장된 항목 없음: 이 Raw 파일은 여기에 사이드카 파일을 둘 수 없습니다 Some settings could not be saved; the raws stay open 일부 설정을 저장할 수 없습니다. Raw 파일은 열린 상태로 유지됩니다 diff --git a/crates/ui-egui/src/i18n/nb.tsv b/crates/ui-egui/src/i18n/nb.tsv index da5e288fbf..d2b94a6adb 100644 --- a/crates/ui-egui/src/i18n/nb.tsv +++ b/crates/ui-egui/src/i18n/nb.tsv @@ -350,7 +350,7 @@ Last Filter Siste filter Filter Gallery… Filtergalleri… Liquify… Gjør flytende… - Camera Raw Filter… Camera Raw-filter… + RAW Develop Filter… RAW-fremkalling-filter… Adaptive Wide Angle… Adaptiv vidvinkel… Lens Correction… Objektivkorreksjon… Vanishing Point… Fluktpunkt… @@ -875,7 +875,7 @@ Working Black Plate Arbeidsplate for svart Working Gray Plate Arbeidsplate for grå -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs Basic Grunnleggende Detail Detalj HSL/Grayscale HSL/gråtoner @@ -905,8 +905,8 @@ Luminance Smoothness Luminansjevnhet Vignetting Vignettering White Balance: As Shot Hvitbalanse: som fotografert - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw er ikke åpen + RAW Defaults… RAW-standarder… + RAW Develop isn't open RAW-fremkalling er ikke åpen Dehaze Fjern dis Texture Tekstur Focal Length Brennvidde @@ -1177,8 +1177,6 @@ Roman Hanging Punctuation Antikva hengende tegnsetting Avoid Widows/Orphans Unngå enker/horunger Compose Komponer - Adobe Single-line Composer Adobe setter for én linje - Adobe Every-line Composer Adobe setter for hver linje Justification Justering Word Spacing Ordmellomrom Letter Spacing Bokstavavstand @@ -1760,8 +1758,8 @@ Load Settings… Last inn innstillinger… Save these settings as a Camera Raw .xmp file Lagre disse innstillingene som en Camera Raw .xmp-fil Load settings from a Camera Raw .xmp file Last inn innstillinger fra en Camera Raw .xmp-fil - Loaded Camera Raw settings from {file} Lastet inn Camera Raw-innstillinger fra {file} - Loaded Camera Raw settings from {file} ({n} not supported) Lastet inn Camera Raw-innstillinger fra {file} ({n} støttes ikke) + Loaded RAW Develop settings from {file} Lastet inn RAW-fremkalling-innstillinger fra {file} + Loaded RAW Develop settings from {file} ({n} not supported) Lastet inn RAW-fremkalling-innstillinger fra {file} ({n} støttes ikke) After (X) Etter (X) Original Original Current Gjeldende @@ -2348,7 +2346,7 @@ CPU (no GPU acceleration) CPU (ingen GPU-akselerasjon) Cache levels Buffernivåer Cache tile size Bufferflisstørrelse - Camera Raw Defaults Camera Raw-standarder + RAW Defaults RAW-standarder Canvas border Lerretkant Show canvas dots Vis lerretprikker Clip thumbnails to layer bounds Klipp miniatyrer til laggrensene @@ -2440,7 +2438,6 @@ Never Aldri Normal tip Normal spiss Open as smart object Åpne som smartobjekt - Open in camera raw Åpne i Camera Raw Open documents as tabs Åpne dokumenter som faner OpenGL OpenGL Orange Oransje @@ -2581,9 +2578,9 @@ Tone Histogram Tonehistogram Show Selected Region Vis valgt område cameraRaw Light Lys -# Camera Raw: contextual controls and window title - Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) +# RAW Develop: contextual controls and window title + RAW Develop Filter ({layer}) RAW-fremkalling-filter ({layer}) + RAW Develop ({name}) RAW-fremkalling ({name}) Aqua Akvamarin cameraRaw Amount Mengde cameraRaw Blacks Svarttoner @@ -3388,7 +3385,7 @@ curves Smooth Jevn ut {name} was changed by another app after it was opened or saved here. {name} ble endret av et annet program etter at den ble åpnet eller lagret her. Replace it with this document, or cancel and use File › Save As to keep both. Erstatt den med dette dokumentet, eller avbryt og bruk Fil › Lagre som for å beholde begge. -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -3414,13 +3411,11 @@ curves Smooth Jevn ut Adjustment Layers Justeringslag Adjustment Properties Egenskaper for justering Adjustment layers have nothing to transform Justeringslag har ingenting å transformere - Adobe PDF Presets… Adobe PDF-forvalg… Adobe-rgb-compat Adobe RGB-kompatibel Adwaita (Dark) Adwaita (mørk) Adwaita (Light) Adwaita (lys) After Etter Airbrush: keeps painting while the pointer rests. Airbrush: fortsetter å male mens pekeren hviler. - All shortcuts reset to Photoshop defaults. Alle hurtigtaster tilbakestilt til Photoshop-standard. Altitude Høyde Ambience Stemning Ambient Omgivelseslys @@ -3505,8 +3500,8 @@ curves Smooth Jevn ut Brush Type Penseltype Burlap Jutevev Calculations Beregninger - Camera Raw Camera Raw - Camera Raw Filter Camera Raw-filter + RAW Develop RAW-fremkalling + RAW Develop Filter RAW-fremkalling-filter Cancel transform Avbryt transformering Candle Light Levende lys Canvas Size Lerretstørrelse @@ -3653,7 +3648,6 @@ curves Smooth Jevn ut Deep Yellow Dyp gul Default Foreground and Background Colors Standard forgrunns- og bakgrunnsfarge Default Leaves Standardblader - Default Photoshop Size Standard Photoshop-størrelse Defaults Standarder Define Brush Preset Definer penselforvalg Define Custom Shape Definer egendefinert form @@ -4754,9 +4748,9 @@ shape Appearance Utseende @plural {n} document|{n} documents {n} dokument|{n} dokumenter @plural {n} pixel|{n} pixels {n} piksel|{n} piksler cameraRaw Before (Y) Før (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) -cameraRaw Camera Raw isn't open Camera Raw er ikke åpen +cameraRaw RAW Develop ({name}) RAW-fremkalling ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW-fremkalling-filter ({layer}) +cameraRaw RAW Develop isn't open RAW-fremkalling er ikke åpen cameraRaw Cancel Avbryt cameraRaw Canceled opening {name} Avbrøt åpning av {name} cameraRaw Canceled {label} Avbrøt {label} @@ -4768,7 +4762,7 @@ cameraRaw Highlight Clipping Warning (O) Advarsel for høylysklipping (O) cameraRaw Highlight Priority Høylysprioritet cameraRaw Load Settings… Last inn innstillinger… cameraRaw Load settings from a Camera Raw .xmp file Last inn innstillinger fra en Camera Raw .xmp-fil -cameraRaw Loaded Camera Raw settings from {file} Lastet inn Camera Raw-innstillinger fra {file} +cameraRaw Loaded RAW Develop settings from {file} Lastet inn RAW-fremkalling-innstillinger fra {file} cameraRaw Noise Reduction Støyreduksjon cameraRaw OK OK cameraRaw Open Åpne @@ -4831,3 +4825,6 @@ cameraRaw White Balance: As Shot Hvitbalanse: som fotografert Auto-size Canvas Endre lerretstørrelse automatisk Keep Relative Position During Layer Reordering Behold relativ posisjon ved omordning av lag Shrinkwrap Canvas on Save Krymp lerretet til innholdet ved lagring + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW-fremkallingsinnstillinger lagret i {file} diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 1f5a2e0564..47239e95f6 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -284,7 +284,7 @@ Plugins… Plug-ins… Type… Tekst… Enhanced Controls… Uitgebreide bediening… - Camera Raw… Camera Raw… + RAW Defaults… RAW-standaardwaarden… Raw Defaults… Raw-standaardwaarden… Integrations… Integraties… AI Integrations… AI-integraties… @@ -617,7 +617,7 @@ Last Filter Laatste filter Filter Gallery… Filtergalerie… Adaptive Wide Angle… Adaptieve groothoek… - Camera Raw Filter… Camera Raw-filter… + RAW Develop Filter… RAW-ontwikkeling-filter… Liquify… Uitvloeien… Vanishing Point… Verdwijnpunt… Blur Vervagen @@ -962,8 +962,8 @@ Load Settings… Instellingen laden… Save these settings as a Camera Raw .xmp file Deze instellingen opslaan als Camera Raw-.xmp-bestand Load settings from a Camera Raw .xmp file Instellingen laden uit een Camera Raw-.xmp-bestand - Loaded Camera Raw settings from {file} Camera Raw-instellingen geladen uit {file} - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw-instellingen geladen uit {file} ({n} niet ondersteund) + Loaded RAW Develop settings from {file} RAW-ontwikkeling-instellingen geladen uit {file} + Loaded RAW Develop settings from {file} ({n} not supported) RAW-ontwikkeling-instellingen geladen uit {file} ({n} niet ondersteund) Begin recording Opname starten Bend: Buiging: Bicubic Bicubisch @@ -990,7 +990,7 @@ Brush Reconstruct Options Opties reconstructiepenseel Brush Tool Options Opties penseelgereedschap Cache Level: Cacheniveau: - Camera Raw isn't open Camera Raw is niet geopend + RAW Develop isn't open RAW-ontwikkeling is niet geopend Cancel Annuleren Reset Herstellen Cancel (Esc) Annuleren (Esc) @@ -1961,7 +1961,7 @@ Brush preview color Kleur penseelvoorvertoning Cache levels Cacheniveaus Cache tile size Tegelgrootte cache - Camera Raw Defaults Standaardwaarden Camera Raw + RAW Defaults RAW-standaardwaarden Canvas border Canvasrand Show canvas dots Canvasstippen tonen Clip thumbnails to layer bounds Miniaturen bijsnijden tot laaggrenzen @@ -2048,7 +2048,6 @@ Never Nooit Normal tip Normale punt Open as smart object Openen als slim object - Open in camera raw Openen in Camera Raw Open documents as tabs Documenten openen als tabbladen Overscroll Doorscrollen Performance Prestaties @@ -2397,8 +2396,8 @@ 3 x 3 3 x 3 4 x 4 4 x 4 5 x 5 5 x 5 - Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW-ontwikkeling-filter ({layer}) + RAW Develop ({name}) RAW-ontwikkeling ({name}) Edit Type Tekst bewerken Grid: Raster: Highlight Clipping Warning (O) Waarschuwing afsnijden hooglichten (O) @@ -3398,7 +3397,6 @@ cameraRaw Color Kleur Add Pins Spelden toevoegen Add a mask (from the selection; ⌥ inverts) Een masker toevoegen (vanuit de selectie; ⌥ keert om) Adds grain to the soft edges of the brush tip. Voegt korrel toe aan de zachte randen van de penseelpunt. - Adobe PDF Presets… Adobe PDF-voorinstellingen… Advanced Blending Geavanceerd overvloeien After (X) Na (X) Airbrush: keeps painting while the pointer rests. Airbrush: blijft schilderen zolang de aanwijzer stilstaat. @@ -3425,8 +3423,8 @@ cameraRaw Color Kleur Border Rand Box Blur Kadervervaging Calculations Berekeningen - Camera Raw Camera Raw - Camera Raw Filter Camera Raw-filter + RAW Develop RAW-ontwikkeling + RAW Develop Filter RAW-ontwikkeling-filter Canvas rotation Canvasrotatie Channel1 Kanaal 1 Channel2 Kanaal 2 @@ -3705,8 +3703,6 @@ cameraRaw Whites Witten Mac Crisp Mac helder Mac Strong Mac krachtig Mac Smooth Mac vloeiend - Adobe Single-line Composer Adobe-zetmachine per regel - Adobe Every-line Composer Adobe-zetmachine voor alle regels X X Y Y 30 fps 30 fps @@ -4372,7 +4368,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Laaggrenzen tonen bij aanwijzen Expand layer group on click Laaggroep uitvouwen bij klikken Show hover bounds from Layers Aanwijsgrenzen tonen vanuit Lagen - Saved Camera Raw settings to {file} Camera Raw-instellingen opgeslagen in {file} + Saved RAW Develop settings to {file} RAW-ontwikkeling-instellingen opgeslagen in {file} Save the settings to each raw's sidecar without opening it De instellingen in het sidecarbestand van elke raw opslaan zonder die te openen No settings saved: these raws can't keep a sidecar here Niets opgeslagen: deze raws kunnen hier geen sidecarbestand krijgen Some settings could not be saved; the raws stay open Sommige instellingen konden niet worden opgeslagen; de raws blijven open diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 805ad97f6a..0581f3376a 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -327,7 +327,7 @@ Plugins… Wtyczki… Type… Tekst… Enhanced Controls… Ulepszone elementy sterujące… - Camera Raw… Camera Raw… + RAW Defaults… Domyślne ustawienia RAW… Raw Defaults… Domyślne ustawienia Raw… Integrations… Integracje… AI Integrations… Integracje AI… @@ -662,7 +662,7 @@ Last Filter Ostatni filtr Filter Gallery… Galeria filtrów… Adaptive Wide Angle… Adaptacyjny szeroki kąt… - Camera Raw Filter… Filtr Camera Raw… + RAW Develop Filter… Filtr Wywoływanie RAW… Liquify… Skraplanie… Vanishing Point… Punkt zbieżności… Blur Rozmycie @@ -1030,8 +1030,8 @@ Load Settings… Wczytaj ustawienia… Save these settings as a Camera Raw .xmp file Zapisz te ustawienia jako plik .xmp Camera Raw Load settings from a Camera Raw .xmp file Wczytaj ustawienia z pliku .xmp Camera Raw - Loaded Camera Raw settings from {file} Wczytano ustawienia Camera Raw z pliku {file} - Loaded Camera Raw settings from {file} ({n} not supported) Wczytano ustawienia Camera Raw z pliku {file} (nieobsługiwane: {n}) + Loaded RAW Develop settings from {file} Wczytano ustawienia Wywoływanie RAW z pliku {file} + Loaded RAW Develop settings from {file} ({n} not supported) Wczytano ustawienia Wywoływanie RAW z pliku {file} (nieobsługiwane: {n}) Begin recording Rozpocznij nagrywanie Bend: Zgięcie: Bicubic Dwusześcienna @@ -1059,7 +1059,7 @@ Brush Reconstruct Options Opcje pędzla rekonstrukcji Brush Tool Options Opcje narzędzia Pędzel Cache Level: Poziom pamięci podręcznej: - Camera Raw isn't open Camera Raw nie jest otwarty + RAW Develop isn't open Wywoływanie RAW nie jest otwarty Cancel Anuluj Cancel (Esc) Anuluj (Esc) Manage submitted jobs in the system print queue Zarządzaj przesłanymi zadaniami w systemowej kolejce drukowania @@ -2026,7 +2026,7 @@ Brush preview color Kolor podglądu pędzla Cache levels Poziomy pamięci podręcznej Cache tile size Rozmiar kafla pamięci podręcznej - Camera Raw Defaults Domyślne ustawienia Camera Raw + RAW Defaults Domyślne ustawienia RAW Canvas border Obramowanie płótna Show canvas dots Pokaż kropki płótna Clip thumbnails to layer bounds Przycinaj miniatury do granic warstwy @@ -2513,8 +2513,6 @@ Roman Hanging Punctuation Wiszące znaki interpunkcyjne (łacińskie) Avoid Widows/Orphans Unikaj wdów i sierot Compose Skład - Adobe Single-line Composer Skład jednowierszowy Adobe - Adobe Every-line Composer Skład wielowierszowy Adobe Justification Justowanie Word Spacing Odstępy między wyrazami Letter Spacing Odstępy między literami @@ -2770,7 +2768,6 @@ Intersect with Część wspólna z Capture Comp Przechwyć kompozycję No Layer Comps Brak kompozycji warstw - Adobe PDF Presets… Ustawienia wstępne Adobe PDF… 3D… 3D… Technology Previews… Podglądy technologii… Background from Layer Tło z warstwy @@ -2848,7 +2845,7 @@ fontWeight Bold Pogrubiony fontWeight ExtraBold Ekstra gruby fontWeight Black Czarny fontWeight Italic Kursywa - Camera Raw Filter ({layer}) Filtr Camera Raw ({layer}) + RAW Develop Filter ({layer}) Filtr Wywoływanie RAW ({layer}) cameraRaw Lights Jasne tony cameraRaw Darks Ciemne tony cameraRaw Blacks Czernie @@ -3207,7 +3204,7 @@ cameraRaw Roughness Chropowatość Color Settings Ustawienia kolorów Assign Profile Przypisz profil Convert to Profile Konwertuj na profil - Camera Raw Camera Raw + RAW Develop Wywoływanie RAW Raw Defaults Domyślne ustawienia Raw AI Integrations Integracje AI Install Plug-in Zainstaluj wtyczkę @@ -3254,7 +3251,7 @@ cameraRaw Roughness Chropowatość Border Obramowanie Contract Zwęź Filter Gallery Galeria filtrów - Camera Raw Filter Filtr Camera Raw + RAW Develop Filter Filtr Wywoływanie RAW Liquify Skraplanie Vanishing Point Punkt zbieżności Field Blur Rozmycie pola @@ -3539,11 +3536,10 @@ cameraRaw Roughness Chropowatość Pick a screen pixel or press Esc to cancel Wybierz piksel ekranu lub naciśnij Esc, aby anulować Scroll to zoom Przewijaj, aby zmieniać powiększenie Drag to pan · Scroll to zoom · Double-click to fit Przeciągnij, aby przesunąć · Przewijaj, aby powiększyć · Kliknij dwukrotnie, aby dopasować - Open in camera raw Otwórz w Camera Raw System title bar Systemowy pasek tytułu More documents Więcej dokumentów Developing {name} Wywoływanie {name} - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop ({name}) Wywoływanie RAW ({name}) Show/Hide All Panels Pokaż/ukryj wszystkie panele Show/Hide Panels Pokaż/ukryj panele Could not open Nie można otworzyć @@ -4236,7 +4232,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Pokaż granice warstwy po najechaniu Expand layer group on click Rozwiń grupę warstw po kliknięciu Show hover bounds from Layers Pokaż granice po najechaniu z panelu Warstwy - Saved Camera Raw settings to {file} Zapisano ustawienia Camera Raw w {file} + Saved RAW Develop settings to {file} Zapisano ustawienia Wywoływanie RAW w {file} Save the settings to each raw's sidecar without opening it Zapisz ustawienia w pliku sidecar każdego pliku raw bez otwierania go No settings saved: these raws can't keep a sidecar here Nic nie zapisano: te pliki raw nie mogą tu mieć pliku sidecar Some settings could not be saved; the raws stay open Nie udało się zapisać niektórych ustawień; pliki raw pozostają otwarte diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index ad9c6ccce5..74b6f4ef87 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -322,7 +322,7 @@ Plugins… Plug-ins… Type… Tipo… Enhanced Controls… Controles aprimorados… - Camera Raw… Camera Raw… + RAW Defaults… Padrões RAW… Raw Defaults… Padrões de Raw… Integrations… Integrações… AI Integrations… Integrações de IA… @@ -640,7 +640,7 @@ Last Filter Último filtro Filter Gallery… Galeria de filtros… Adaptive Wide Angle… Grande angular adaptável… - Camera Raw Filter… Filtro Camera Raw… + RAW Develop Filter… Filtro Revelação RAW… Liquify… Liquefazer… Vanishing Point… Ponto de fuga… Blur Desfoque @@ -993,8 +993,8 @@ Load Settings… Carregar configurações… Save these settings as a Camera Raw .xmp file Salvar estas configurações como arquivo .xmp do Camera Raw Load settings from a Camera Raw .xmp file Carregar configurações de um arquivo .xmp do Camera Raw - Loaded Camera Raw settings from {file} Configurações do Camera Raw carregadas de {file} - Loaded Camera Raw settings from {file} ({n} not supported) Configurações do Camera Raw carregadas de {file} ({n} sem suporte) + Loaded RAW Develop settings from {file} Configurações do Revelação RAW carregadas de {file} + Loaded RAW Develop settings from {file} ({n} not supported) Configurações do Revelação RAW carregadas de {file} ({n} sem suporte) Begin recording Iniciar gravação Bend: Curvatura: Bicubic Bicúbica @@ -1022,7 +1022,7 @@ Brush Reconstruct Options Opções de reconstrução do pincel Brush Tool Options Opções da ferramenta Pincel Cache Level: Nível do cache: - Camera Raw isn't open Camera Raw não está aberto + RAW Develop isn't open Revelação RAW não está aberto Cancel Cancelar Cancel (Esc) Cancelar (Esc) Manage submitted jobs in the system print queue Gerencie os trabalhos enviados na fila de impressão do sistema @@ -1984,7 +1984,7 @@ Brush preview color Cor da visualização do pincel Cache levels Níveis do cache Cache tile size Tamanho do bloco do cache - Camera Raw Defaults Padrões do Camera Raw + RAW Defaults Padrões RAW Canvas border Borda da tela de pintura Show canvas dots Mostrar pontos da tela de pintura Clip thumbnails to layer bounds Recortar miniaturas aos limites da camada @@ -2071,7 +2071,6 @@ Never Nunca Normal tip Ponta normal Open as smart object Abrir como objeto inteligente - Open in camera raw Abrir no Camera Raw Open documents as tabs Abrir documentos como guias Overscroll Rolagem além dos limites Performance Desempenho @@ -2475,8 +2474,6 @@ Roman Hanging Punctuation Pontuação romana deslocada Avoid Widows/Orphans Evitar viúvas/órfãs Compose Compor - Adobe Single-line Composer Compositor de linha única Adobe - Adobe Every-line Composer Compositor de todas as linhas Adobe Justification Justificação Word Spacing Espaçamento entre palavras Letter Spacing Espaçamento entre letras @@ -2732,7 +2729,6 @@ Intersect with Fazer interseção com Capture Comp Capturar composição No Layer Comps Nenhuma composição de camadas - Adobe PDF Presets… Predefinições do Adobe PDF… 3D… 3D… Technology Previews… Prévias de tecnologia… Background from Layer Plano de fundo a partir da camada @@ -2823,8 +2819,8 @@ Tone Histogram Histograma de tons Show Selected Region Mostrar região selecionada cameraRaw Light Luz - Camera Raw Filter ({layer}) Filtro Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtro Revelação RAW ({layer}) + RAW Develop ({name}) Revelação RAW ({name}) cameraRaw Lights Claros cameraRaw Darks Escuros cameraRaw Blacks Pretos @@ -3849,8 +3845,8 @@ layerLabel No Color Sem cor Border Borda Box Blur Desfoque de caixa Calculations Cálculos - Camera Raw Camera Raw - Camera Raw Filter Filtro do Camera Raw + RAW Develop Revelação RAW + RAW Develop Filter Filtro do Revelação RAW Channel1 Canal 1 Channel2 Canal 2 Channel3 Canal 3 @@ -4532,7 +4528,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Mostrar limites da camada ao passar o cursor Expand layer group on click Expandir grupo de camadas ao clicar Show hover bounds from Layers Mostrar limites ao passar o cursor em Camadas - Saved Camera Raw settings to {file} Configurações do Camera Raw salvas em {file} + Saved RAW Develop settings to {file} Configurações do Revelação RAW salvas em {file} Save the settings to each raw's sidecar without opening it Salvar as configurações no arquivo sidecar de cada raw sem abri-lo No settings saved: these raws can't keep a sidecar here Nada foi salvo: estes raw não podem ter um arquivo sidecar aqui Some settings could not be saved; the raws stay open Não foi possível salvar algumas configurações; os raw continuam abertos diff --git a/crates/ui-egui/src/i18n/ro.tsv b/crates/ui-egui/src/i18n/ro.tsv index 57539882ab..d21935d19e 100644 --- a/crates/ui-egui/src/i18n/ro.tsv +++ b/crates/ui-egui/src/i18n/ro.tsv @@ -30,7 +30,7 @@ # Tool, filter, warp-style, path, layer-comp and metadata names that fell outside the `tl!` test. # Command-id override: under Edit > Purge a bare "Undo" reads as an action, not the history. # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title # About ▸ Contributors / Models (credits, craftrules standards/contributors.md) # Swatches panel # Layer Style > Blending Options (Advanced Blending) @@ -55,7 +55,7 @@ # Print dialog (#2697) # Counted status messages and labels (#3454) # View › Guides › New Guide… › Color -# Dynamic labels (filter and adjustment parameters, Camera Raw, panels, dialogs) translated from +# Dynamic labels (filter and adjustment parameters, RAW Develop, panels, dialogs) translated from # the English source, following the pattern of the other complete catalogs. # Path, channel, layer style, status and System Info labels # Actions panel: Load/Save Actions (.atn) and kept Photoshop steps @@ -266,7 +266,7 @@ Plug-ins… Plugin-uri… Type… Text… Enhanced Controls… Controale îmbunătățite… - Camera Raw… Camera Raw… + RAW Defaults… Valori implicite RAW… Raw Defaults… Valori implicite Raw… Integrations… Integrări… AI Integrations… Integrări AI… @@ -596,7 +596,7 @@ Last Filter Ultimul filtru Filter Gallery… Galerie de filtre… Adaptive Wide Angle… Unghi larg adaptabil… - Camera Raw Filter… Filtru Camera Raw… + RAW Develop Filter… Filtru Developare RAW… Liquify… Lichefiere… Vanishing Point… Punct de fugă… Blur Neclaritate @@ -944,8 +944,8 @@ Load Settings… Încărcare setări… Save these settings as a Camera Raw .xmp file Salvare acestor setări ca fișier .xmp Camera Raw Load settings from a Camera Raw .xmp file Încărcare setări dintr-un fișier .xmp Camera Raw - Loaded Camera Raw settings from {file} Setări Camera Raw încărcate din {file} - Loaded Camera Raw settings from {file} ({n} not supported) Setări Camera Raw încărcate din {file} ({n} nesuportate) + Loaded RAW Develop settings from {file} Setări Developare RAW încărcate din {file} + Loaded RAW Develop settings from {file} ({n} not supported) Setări Developare RAW încărcate din {file} ({n} nesuportate) Begin recording Pornire înregistrare Bend: Curbură: Bicubic Bicubică @@ -973,7 +973,7 @@ Brush Reconstruct Options Opțiuni reconstrucție pensulă Brush Tool Options Opțiuni instrument Pensulă Cache Level: Nivel cache: - Camera Raw isn't open Camera Raw nu este deschis + RAW Develop isn't open Developare RAW nu este deschis Cancel Anulare Cancel (Esc) Anulare (Esc) Manage submitted jobs in the system print queue Gestionarea lucrărilor trimise în coada de imprimare a sistemului @@ -1944,7 +1944,7 @@ Brush preview color Culoare previzualizare pensulă Cache levels Niveluri cache Cache tile size Dimensiune mozaic cache - Camera Raw Defaults Valori implicite Camera Raw + RAW Defaults Valori implicite RAW Canvas border Margine pânză Show canvas dots Afișare puncte pânză Clip thumbnails to layer bounds Decupare miniaturi la limitele stratului @@ -2026,7 +2026,6 @@ Never Niciodată Normal tip Vârf normal Open as smart object Deschidere ca obiect inteligent - Open in camera raw Deschidere în Camera Raw Open documents as tabs Deschidere documente ca file Overscroll Suprascrolare Performance Performanță @@ -2387,8 +2386,8 @@ Tone Histogram Histogramă tonală Show Selected Region Afișare regiune selectată cameraRaw Light Lumină - Camera Raw Filter ({layer}) Filtru Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Filtru Developare RAW ({layer}) + RAW Develop ({name}) Developare RAW ({name}) cameraRaw Lights Luminile cameraRaw Darks Umbrele cameraRaw Red Roșii @@ -2985,8 +2984,6 @@ curves Smooth Netezire Roman Hanging Punctuation Punctuație latină suspendată Avoid Widows/Orphans Evitare linii văduve/orfane Compose Compunere - Adobe Single-line Composer Compozitor Adobe cu o linie - Adobe Every-line Composer Compozitor Adobe multilinie Word Spacing Spațiu între cuvinte Letter Spacing Spațiu între caractere Glyph Scaling Scalare glife @@ -3182,7 +3179,6 @@ curves Smooth Netezire Intersect with Intersectare cu Capture Comp Capturare compoziție No Layer Comps Nicio compoziție de strat - Adobe PDF Presets… Presetări Adobe PDF… 3D… 3D… Technology Previews… Previzualizări de tehnologie… Add a mask (from the selection; ⌥ inverts) Adăugare mască (din selecție; ⌥ inversează) @@ -3799,8 +3795,8 @@ layerLabel No Color Fără culoare Border Margine Box Blur Neclaritate cutie Calculations Calcule - Camera Raw Camera Raw - Camera Raw Filter Filtru Camera Raw + RAW Develop Developare RAW + RAW Develop Filter Filtru Developare RAW Channel1 Canal 1 Channel2 Canal 2 Channel3 Canal 3 @@ -4614,3 +4610,6 @@ navigator Zoom Zoom @plural {n} action file loaded|{n} action files loaded {n} fișier de acțiuni încărcat|{n} fișiere de acțiuni încărcate|{n} de fișiere de acțiuni încărcate @plural {n} file could not be loaded: {errors}|{n} files could not be loaded: {errors} {n} fișier nu a putut fi încărcat: {errors}|{n} fișiere nu au putut fi încărcate: {errors}|{n} de fișiere nu au putut fi încărcate: {errors} @plural {what}: {n} Image Assets output failed|{what}: {n} Image Assets outputs failed {what}: {n} ieșire Resurse imagine a eșuat|{what}: {n} ieșiri Resurse imagine au eșuat|{what}: {n} de ieșiri Resurse imagine au eșuat + +# RAW Develop feature labels + Saved RAW Develop settings to {file} Setările de developare RAW au fost salvate în {file} diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 2f97851b03..67b7761ee5 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -66,7 +66,7 @@ # Filters and adjustments dialogs -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs # Adjustments panel @@ -125,7 +125,7 @@ # Preference dialog: generated setting labels and dropdown choices # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title @@ -199,7 +199,7 @@ # Preferences › Performance › GPU Memory; the status bar and slow-redraw notice -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -523,7 +523,7 @@ Last Filter Последний фильтр Filter Gallery… Галерея фильтров… Liquify… Пластичность… - Camera Raw Filter… Фильтр Camera Raw… + RAW Develop Filter… Фильтр Обработка RAW… Adaptive Wide Angle… Адаптивный широкий угол… Lens Correction… Коррекция дисторсии… Vanishing Point… Точка схода… @@ -1055,8 +1055,8 @@ Luminance Smoothness Световая сглаженность Vignetting Виньетирование White Balance: As Shot Баланс белого: как снято - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw не открыт + RAW Defaults… Настройки RAW по умолчанию… + RAW Develop isn't open Обработка RAW не открыт Dehaze Устранение дымки Texture Текстура Focal Length Фокусное расстояние @@ -1315,8 +1315,6 @@ Roman Hanging Punctuation Висячая пунктуация (римская) Avoid Widows/Orphans Избегать висячих строк Compose Компоновка - Adobe Single-line Composer Построчная компоновка Adobe - Adobe Every-line Composer Абзацная компоновка Adobe Justification Выключка Word Spacing Межсловные интервалы Letter Spacing Межбуквенные интервалы @@ -1872,8 +1870,8 @@ Load Settings… Загрузить настройки… Save these settings as a Camera Raw .xmp file Сохранить эти настройки в файл Camera Raw .xmp Load settings from a Camera Raw .xmp file Загрузить настройки из файла Camera Raw .xmp - Loaded Camera Raw settings from {file} Настройки Camera Raw загружены из {file} - Loaded Camera Raw settings from {file} ({n} not supported) Настройки Camera Raw загружены из {file} (не поддерживается: {n}) + Loaded RAW Develop settings from {file} Настройки Обработка RAW загружены из {file} + Loaded RAW Develop settings from {file} ({n} not supported) Настройки Обработка RAW загружены из {file} (не поддерживается: {n}) After (X) После (X) Original Оригинал Current Текущий @@ -2443,7 +2441,7 @@ CPU (no GPU acceleration) ЦП (без ускорения GPU) Cache levels Уровни кэша Cache tile size Размер блока кэша - Camera Raw Defaults Значения Camera Raw по умолчанию + RAW Defaults Настройки RAW по умолчанию Canvas border Рамка холста Show canvas dots Показывать точки холста Clip thumbnails to layer bounds Обрезать миниатюры по границам слоя @@ -2535,7 +2533,6 @@ Never Никогда Normal tip Контур кисти (50%) Open as smart object Открывать как смарт-объект - Open in camera raw Открывать в Camera Raw Open documents as tabs Открывать документы во вкладках OpenGL OpenGL Orange Оранжевая @@ -2675,8 +2672,8 @@ Tone Histogram Тональная гистограмма Show Selected Region Показать выделенную область cameraRaw Light Свет - Camera Raw Filter ({layer}) Фильтр Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Фильтр Обработка RAW ({layer}) + RAW Develop ({name}) Обработка RAW ({name}) Aqua Голубой cameraRaw Amount Интенсивность cameraRaw Blacks Чёрные @@ -3441,13 +3438,11 @@ curves Smooth Сгладить Adjustment Layers Корректирующие слои Adjustment Properties Свойства коррекции Adjustment layers have nothing to transform В корректирующих слоях нечего трансформировать - Adobe PDF Presets… Наборы Adobe PDF… Adobe-rgb-compat Adobe RGB (совместимо) Adwaita (Dark) Adwaita (тёмная) Adwaita (Light) Adwaita (светлая) After После Airbrush: keeps painting while the pointer rests. Аэрограф: продолжает рисовать, пока указатель неподвижен. - All shortcuts reset to Photoshop defaults. Все сочетания клавиш сброшены к значениям Photoshop по умолчанию. Altitude Высота Ambience Атмосфера Ambient Окружающий свет @@ -3532,8 +3527,8 @@ curves Smooth Сгладить Brush Type Тип кисти Burlap Мешковина Calculations Вычисления - Camera Raw Camera Raw - Camera Raw Filter Фильтр Camera Raw + RAW Develop Обработка RAW + RAW Develop Filter Фильтр Обработка RAW Cancel transform Отменить трансформирование Candle Light Свет свечи Canvas Size Размер холста @@ -3680,7 +3675,6 @@ curves Smooth Сгладить Deep Yellow Глубокий жёлтый Default Foreground and Background Colors Цвета переднего плана и фона по умолчанию Default Leaves Листья по умолчанию - Default Photoshop Size Размер Photoshop по умолчанию Defaults По умолчанию Define Brush Preset Определить кисть Define Custom Shape Определить свою фигуру @@ -4803,7 +4797,7 @@ shape Appearance Оформление Show layer bounds on hover Показывать границы слоя при наведении Expand layer group on click Раскрывать группу слоёв по щелчку Show hover bounds from Layers Показывать границы при наведении из панели «Слои» - Saved Camera Raw settings to {file} Настройки Camera Raw сохранены в {file} + Saved RAW Develop settings to {file} Настройки Обработка RAW сохранены в {file} Save the settings to each raw's sidecar without opening it Сохранить настройки в сопроводительный файл каждого raw, не открывая его No settings saved: these raws can't keep a sidecar here Ничего не сохранено: у этих raw здесь не может быть сопроводительного файла Some settings could not be saved; the raws stay open Не удалось сохранить некоторые настройки; raw остаются открытыми diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv index 6db65bf2ef..5e142c87ac 100644 --- a/crates/ui-egui/src/i18n/sr.tsv +++ b/crates/ui-egui/src/i18n/sr.tsv @@ -18,7 +18,7 @@ # (Datoteka, Uređivanje, Slika ...), commands are imperatives (Otvori…, Sačuvaj kao…), tools read # "Alatka …" (Alatka četkica, Alatka za pomeranje), presets are "šabloni", patterns "šare" and # swatches "uzorci boja". Serbian quotation marks „…“ around names. Product and technology names -# (PhotoCraft, ArtCraft, Camera Raw, OpenType, Lab ...) stay as they are; RGB/CMYK stay as they +# (PhotoCraft, ArtCraft, RAW Develop, OpenType, Lab ...) stay as they are; RGB/CMYK stay as they # are; the trailing "…" of dialog commands is kept. A count that is not an @plural entry is kept # out of noun agreement ("Broj: {n}", "slojeva: {n}") so every number reads correctly. @@ -34,7 +34,7 @@ # Labels added on main after this catalog (depth labels, Wayland drop, profiles, rendering mode) -# Camera Raw scopes and the Patch tool +# RAW Develop scopes and the Patch tool # Warp grid presets (#388) @@ -75,11 +75,11 @@ # Gradient Editor window, opened from the options bar's gradient swatch. -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title # Counted status messages and labels (Serbian: one | few | many) -# Dynamic labels (filter and adjustment parameters, Camera Raw, panels, dialogs) +# Dynamic labels (filter and adjustment parameters, RAW Develop, panels, dialogs) # Path, channel, layer style, status and System Info labels the Czech catalog added @@ -91,14 +91,14 @@ # Character, Paragraph and Glyphs panels -# Camera Raw labels +# RAW Develop labels # Keyboard Shortcuts and Menus editor # Color Settings dialog -# Camera Raw chrome, tone, curve, color mixer, grading, detail and effects +# RAW Develop chrome, tone, curve, color mixer, grading, detail and effects # New Document, Home and Image Size @@ -106,7 +106,7 @@ # Contextual labels -# Added on merge with main (spelling, Camera Raw settings files, printing, Object Finder, brush +# Added on merge with main (spelling, RAW Develop settings files, printing, Object Finder, brush # controls, actions, gradient presets, Pen Auto Add/Delete) # Native Windows printing qualification @@ -348,7 +348,7 @@ Plugins… Dodaci… Type… Tekst… Enhanced Controls… Napredne kontrole… - Camera Raw… Camera Raw… + RAW Defaults… Podrazumevana RAW podešavanja… Raw Defaults… Podrazumevana Raw podešavanja… Integrations… Integracije… AI Integrations… AI integracije… @@ -666,7 +666,7 @@ Last Filter Poslednji filter Filter Gallery… Galerija filtera… Adaptive Wide Angle… Prilagodljivi široki ugao… - Camera Raw Filter… Camera Raw filter… + RAW Develop Filter… RAW obrada filter… Liquify… Tečno izobličavanje… Vanishing Point… Tačka nestajanja… Blur Zamućenje @@ -1042,7 +1042,7 @@ Brush Reconstruct Options Opcije četkice za rekonstrukciju Brush Tool Options Opcije alatke četkica Cache Level: Nivo keša: - Camera Raw isn't open Camera Raw nije otvoren + RAW Develop isn't open RAW obrada nije otvoren Cancel Otkaži Cancel (Esc) Otkaži (Esc) Cancel any current edits (Esc) Otkaži sve tekuće izmene (Esc) @@ -2000,7 +2000,7 @@ Brush preview color Boja pregleda četkice Cache levels Nivoi keša Cache tile size Veličina pločice keša - Camera Raw Defaults Podrazumevana Camera Raw podešavanja + RAW Defaults Podrazumevana RAW podešavanja Canvas border Ivica platna Show canvas dots Prikaži tačke na platnu Clip thumbnails to layer bounds Iseci sličice prema granicama sloja @@ -2087,7 +2087,6 @@ Never Nikad Normal tip Normalan vrh Open as smart object Otvori kao pametni objekat - Open in camera raw Otvori u Camera Raw-u Open documents as tabs Otvaraj dokumente kao kartice Overscroll Pomeranje preko ivice Performance Performanse @@ -2497,8 +2496,6 @@ Roman Hanging Punctuation Viseća interpunkcija za latinicu Avoid Widows/Orphans Izbegavaj udovice/siročiće Compose Slaganje - Adobe Single-line Composer Adobe slagač pojedinačnih redova - Adobe Every-line Composer Adobe slagač svih redova Justification Obostrano poravnanje Word Spacing Razmak između reči Letter Spacing Razmak između slova @@ -2754,7 +2751,6 @@ Intersect with Presek sa Capture Comp Zabeleži kompoziciju No Layer Comps Nema kompozicija slojeva - Adobe PDF Presets… Adobe PDF šabloni… 3D… 3D… Technology Previews… Probne tehnologije… Background from Layer Pozadina od sloja @@ -2845,8 +2841,8 @@ Tone Histogram Tonski histogram Show Selected Region Prikaži izabranu oblast cameraRaw Light Svetlo - Camera Raw Filter ({layer}) Camera Raw filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW obrada filter ({layer}) + RAW Develop ({name}) RAW obrada ({name}) cameraRaw Lights Svetli tonovi cameraRaw Darks Tamni tonovi cameraRaw Blacks Crne @@ -3869,8 +3865,8 @@ layerLabel No Color Bez boje Border Obod Box Blur Pravougaono zamućenje Calculations Proračuni - Camera Raw Camera Raw - Camera Raw Filter Camera Raw filter + RAW Develop RAW obrada + RAW Develop Filter RAW obrada filter Channel1 Kanal 1 Channel2 Kanal 2 Channel3 Kanal 3 @@ -4220,7 +4216,6 @@ layerLabel Magenta Magenta Save Path Sačuvaj putanju cameraRaw Highlights Svetla cameraRaw Shadows Senke - All shortcuts reset to Photoshop defaults. Sve prečice su vraćene na podrazumevane vrednosti Photoshop-a. Temporary Privremeno none nijedna red crvena @@ -4270,7 +4265,6 @@ cameraRaw Feather Omekšavanje cameraRaw Midpoint Središte cameraRaw Roundness Zaobljenost cameraRaw Size Veličina - Default Photoshop Size Podrazumevana Photoshop veličina document Orientation Orijentacija Arc Lower Donji luk Arc Upper Gornji luk @@ -4295,8 +4289,8 @@ shape Appearance Izgled Load Settings… Učitaj podešavanja… Save these settings as a Camera Raw .xmp file Sačuvaj ova podešavanja kao Camera Raw .xmp datoteku Load settings from a Camera Raw .xmp file Učitaj podešavanja iz Camera Raw .xmp datoteke - Loaded Camera Raw settings from {file} Camera Raw podešavanja su učitana iz {file} - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw podešavanja su učitana iz {file} (nije podržano: {n}) + Loaded RAW Develop settings from {file} RAW obrada podešavanja su učitana iz {file} + Loaded RAW Develop settings from {file} ({n} not supported) RAW obrada podešavanja su učitana iz {file} (nije podržano: {n}) Manage submitted jobs in the system print queue Upravljajte poslatim poslovima u sistemskom redu za štampu Pick Color From Image Uzmi boju sa slike Drag to pan · Scroll to zoom · Double-click to fit Prevucite za pomeranje · Skrolujte za zumiranje · Dvaput kliknite za uklapanje @@ -4684,7 +4678,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Prikaži granice sloja pri prelasku miša Expand layer group on click Proširi grupu slojeva klikom Show hover bounds from Layers Prikaži granice pri prelasku iz panela Slojevi - Saved Camera Raw settings to {file} Подешавања Camera Raw сачувана у {file} + Saved RAW Develop settings to {file} Подешавања RAW obrada сачувана у {file} Save the settings to each raw's sidecar without opening it Sačuvaj podešavanja u prateću datoteku svakog raw snimka bez otvaranja No settings saved: these raws can't keep a sidecar here Ništa nije sačuvano: ovi raw snimci ovde ne mogu imati prateću datoteku Some settings could not be saved; the raws stay open Neka podešavanja nije moguće sačuvati; raw snimci ostaju otvoreni diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 486a9a19cd..867dac9efe 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -348,7 +348,7 @@ Last Filter Senaste filter Filter Gallery… Filtergalleri… Liquify… Gör flytande… - Camera Raw Filter… Camera Raw-filter… + RAW Develop Filter… RAW-framkallning-filter… Adaptive Wide Angle… Adaptiv vidvinkel… Lens Correction… Objektivkorrigering… Vanishing Point… Fluktpunkt… @@ -873,7 +873,7 @@ Working Black Plate Svart arbetsplåt Working Gray Plate Grå arbetsplåt -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs Basic Grundläggande Detail Detalj HSL/Grayscale HSL/gråskala @@ -903,8 +903,8 @@ Luminance Smoothness Luminansutjämning Vignetting Vinjettering White Balance: As Shot Vitbalans: som tagen - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw är inte öppet + RAW Defaults… Standardinställningar för RAW… + RAW Develop isn't open RAW-framkallning är inte öppet Dehaze Ta bort dis Texture Struktur Focal Length Brännvidd @@ -1175,8 +1175,6 @@ Roman Hanging Punctuation Hängande interpunktion (roman) Avoid Widows/Orphans Undvik änkor/horungar Compose Komponera - Adobe Single-line Composer Adobe Single-line Composer - Adobe Every-line Composer Adobe Every-line Composer Justification Marginaljustering Word Spacing Ordavstånd Letter Spacing Teckenavstånd @@ -1758,8 +1756,8 @@ Load Settings… Läs in inställningar… Save these settings as a Camera Raw .xmp file Spara de här inställningarna som en .xmp-fil för Camera Raw Load settings from a Camera Raw .xmp file Läs in inställningar från en Camera Raw .xmp-fil - Loaded Camera Raw settings from {file} Läste in Camera Raw-inställningar från {file} - Loaded Camera Raw settings from {file} ({n} not supported) Läste in Camera Raw-inställningar från {file} ({n} stöds inte) + Loaded RAW Develop settings from {file} Läste in RAW-framkallning-inställningar från {file} + Loaded RAW Develop settings from {file} ({n} not supported) Läste in RAW-framkallning-inställningar från {file} ({n} stöds inte) After (X) Efter (X) Original Original Current Aktuell @@ -2346,7 +2344,7 @@ CPU (no GPU acceleration) CPU (ingen GPU-acceleration) Cache levels Cachenivåer Cache tile size Storlek på cacheblock - Camera Raw Defaults Standardinställningar för Camera Raw + RAW Defaults Standardinställningar för RAW Canvas border Arbetsytans kant Show canvas dots Visa punkter på arbetsytan Clip thumbnails to layer bounds Begränsa miniatyrer till lagergränser @@ -2438,7 +2436,6 @@ Never Aldrig Normal tip Normal spets Open as smart object Öppna som smart objekt - Open in camera raw Öppna i Camera Raw Open documents as tabs Öppna dokument som flikar OpenGL OpenGL Orange Orange @@ -2579,9 +2576,9 @@ Tone Histogram Tonhistogram Show Selected Region Visa markerat område cameraRaw Light Ljus -# Camera Raw: contextual controls and window title - Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) - Camera Raw ({name}) Camera Raw ({name}) +# RAW Develop: contextual controls and window title + RAW Develop Filter ({layer}) RAW-framkallning-filter ({layer}) + RAW Develop ({name}) RAW-framkallning ({name}) Aqua Akvamarin cameraRaw Amount Mängd cameraRaw Blacks Svarta @@ -3386,7 +3383,7 @@ curves Smooth Jämna ut {name} was changed by another app after it was opened or saved here. {name} har ändrats av en annan app efter att den öppnades eller sparades här. Replace it with this document, or cancel and use File › Save As to keep both. Ersätt den med det här dokumentet, eller avbryt och använd Arkiv › Spara som för att behålla båda. -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -3412,13 +3409,11 @@ curves Smooth Jämna ut Adjustment Layers Justeringslager Adjustment Properties Justeringsegenskaper Adjustment layers have nothing to transform Justeringslager har inget att ombilda - Adobe PDF Presets… Adobe PDF-förinställningar… Adobe-rgb-compat Adobe RGB (kompatibel) Adwaita (Dark) Adwaita (mörkt) Adwaita (Light) Adwaita (ljust) After Efter Airbrush: keeps painting while the pointer rests. Airbrush: fortsätter att måla medan pekaren står still. - All shortcuts reset to Photoshop defaults. Alla kortkommandon har återställts till Photoshops standardvärden. Altitude Höjd Ambience Atmosfär Ambient Omgivande @@ -3503,8 +3498,8 @@ curves Smooth Jämna ut Brush Type Penseltyp Burlap Säckväv Calculations Beräkningar - Camera Raw Camera Raw - Camera Raw Filter Camera Raw-filter + RAW Develop RAW-framkallning + RAW Develop Filter RAW-framkallning-filter Cancel transform Avbryt ombildning Candle Light Stearinljus Canvas Size Storlek på arbetsyta @@ -3651,7 +3646,6 @@ curves Smooth Jämna ut Deep Yellow Djupgul Default Foreground and Background Colors Standardfärger för förgrund och bakgrund Default Leaves Standardlöv - Default Photoshop Size Standardstorlek för Photoshop Defaults Standardvärden Define Brush Preset Definiera penselförinställning Define Custom Shape Definiera anpassad form @@ -4752,9 +4746,9 @@ shape Appearance Utseende @plural {n} document|{n} documents {n} dokument|{n} dokument @plural {n} pixel|{n} pixels {n} pixel|{n} pixlar cameraRaw Before (Y) Före (Y) -cameraRaw Camera Raw ({name}) Camera Raw ({name}) -cameraRaw Camera Raw Filter ({layer}) Camera Raw-filter ({layer}) -cameraRaw Camera Raw isn't open Camera Raw är inte öppet +cameraRaw RAW Develop ({name}) RAW-framkallning ({name}) +cameraRaw RAW Develop Filter ({layer}) RAW-framkallning-filter ({layer}) +cameraRaw RAW Develop isn't open RAW-framkallning är inte öppet cameraRaw Cancel Avbryt cameraRaw Canceled opening {name} Öppningen av {name} avbröts cameraRaw Canceled {label} {label} avbröts @@ -4766,7 +4760,7 @@ cameraRaw Highlight Clipping Warning (O) Varning för klippning i högdagrar (O) cameraRaw Highlight Priority Högdagerprioritet cameraRaw Load Settings… Läs in inställningar… cameraRaw Load settings from a Camera Raw .xmp file Läs in inställningar från en Camera Raw .xmp-fil -cameraRaw Loaded Camera Raw settings from {file} Läste in Camera Raw-inställningar från {file} +cameraRaw Loaded RAW Develop settings from {file} Läste in RAW-framkallning-inställningar från {file} cameraRaw Noise Reduction Brusreducering cameraRaw OK OK cameraRaw Open Öppna @@ -4829,3 +4823,6 @@ cameraRaw White Balance: As Shot Vitbalans: som tagen Auto-size Canvas Ändra storlek på arbetsytan automatiskt Keep Relative Position During Layer Reordering Behåll relativ position vid ändring av lagerordning Shrinkwrap Canvas on Save Krymp arbetsytan till innehållet vid sparning + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW-framkallningsinställningar sparade i {file} diff --git a/crates/ui-egui/src/i18n/ta.tsv b/crates/ui-egui/src/i18n/ta.tsv index 8131977605..b280a109a1 100644 --- a/crates/ui-egui/src/i18n/ta.tsv +++ b/crates/ui-egui/src/i18n/ta.tsv @@ -219,7 +219,7 @@ Plug-ins… செருகுநிரல்கள்… Type… உரை… Enhanced Controls… மேம்படுத்தப்பட்ட கட்டுப்பாடுகள்… - Camera Raw… கேமரா Raw… + RAW Defaults… RAW இயல்புநிலைகள்… Raw Defaults… Raw இயல்புநிலைகள்… Integrations… ஒருங்கிணைப்புகள்… AI Integrations… AI ஒருங்கிணைப்புகள்… @@ -548,7 +548,7 @@ Last Filter கடைசி வடிகட்டி Filter Gallery… வடிகட்டி காட்சியகம்… Adaptive Wide Angle… தகவமைக்கும் அகலக் கோணம்… - Camera Raw Filter… கேமரா Raw வடிகட்டி… + RAW Develop Filter… RAW உருவாக்கம் வடிகட்டி… Liquify… திரவமாக்கு… Vanishing Point… மறையும் புள்ளி… Blur மங்கலாக்கு @@ -891,8 +891,8 @@ Load Settings… அமைப்புகளை ஏற்று… Save these settings as a Camera Raw .xmp file இந்த அமைப்புகளை கேமரா Raw .xmp கோப்பாகச் சேமி Load settings from a Camera Raw .xmp file கேமரா Raw .xmp கோப்பிலிருந்து அமைப்புகளை ஏற்று - Loaded Camera Raw settings from {file} {file} இலிருந்து கேமரா Raw அமைப்புகள் ஏற்றப்பட்டன - Loaded Camera Raw settings from {file} ({n} not supported) {file} இலிருந்து கேமரா Raw அமைப்புகள் ஏற்றப்பட்டன ({n} ஆதரிக்கப்படவில்லை) + Loaded RAW Develop settings from {file} {file} இலிருந்து RAW உருவாக்கம் அமைப்புகள் ஏற்றப்பட்டன + Loaded RAW Develop settings from {file} ({n} not supported) {file} இலிருந்து RAW உருவாக்கம் அமைப்புகள் ஏற்றப்பட்டன ({n} ஆதரிக்கப்படவில்லை) Begin recording பதிவைத் தொடங்கு Bend: வளைவு: Bicubic இருபக்கக் கனச்சதுர @@ -920,7 +920,7 @@ Brush Reconstruct Options தூரிகை மறுகட்டமைப்பு விருப்பங்கள் Brush Tool Options தூரிகைக் கருவி விருப்பங்கள் Cache Level: தற்காலிக சேமிப்பு நிலை: - Camera Raw isn't open கேமரா Raw திறக்கப்படவில்லை + RAW Develop isn't open RAW உருவாக்கம் திறக்கப்படவில்லை Cancel ரத்துசெய் Cancel (Esc) ரத்துசெய் (Esc) Manage submitted jobs in the system print queue சமர்ப்பித்த வேலைகளைக் கணினி அச்சு வரிசையில் நிர்வகி @@ -1896,7 +1896,7 @@ Brush preview color தூரிகை முன்னோட்ட நிறம் Cache levels தற்காலிக சேமிப்பு நிலைகள் Cache tile size தற்காலிக சேமிப்பு ஓடு அளவு - Camera Raw Defaults கேமரா Raw இயல்புநிலைகள் + RAW Defaults RAW இயல்புநிலைகள் Canvas border படச்சட்ட விளிம்பு Show canvas dots படச்சட்ட புள்ளிகளைக் காண்பி Clip thumbnails to layer bounds சிறுபடங்களை அடுக்கு எல்லைக்கு வெட்டு @@ -1978,7 +1978,6 @@ Never ஒருபோதும் இல்லை Normal tip இயல்பான முனை Open as smart object திறன்மிகு பொருளாகத் திற - Open in camera raw கேமரா Raw இல் திற Open documents as tabs ஆவணங்களைத் தாவல்களாகத் திற Overscroll மிகைஉருட்டல் Performance செயல்திறன் @@ -2336,8 +2335,8 @@ Tone Histogram தொனி ஹிஸ்டோகிராம் Show Selected Region தேர்ந்தெடுத்த பகுதியைக் காண்பி cameraRaw Light ஒளி - Camera Raw Filter ({layer}) கேமரா Raw வடிகட்டி ({layer}) - Camera Raw ({name}) கேமரா Raw ({name}) + RAW Develop Filter ({layer}) RAW உருவாக்கம் வடிகட்டி ({layer}) + RAW Develop ({name}) RAW உருவாக்கம் ({name}) cameraRaw Lights ஒளிகள் cameraRaw Darks கருமைகள் cameraRaw Red சிவப்பு @@ -2929,8 +2928,6 @@ curves Smooth மென்மையாக்கு Roman Hanging Punctuation ரோமன் தொங்கும் நிறுத்தற்குறிகள் Avoid Widows/Orphans தனித்த வரிகளைத் தவிர் Compose அமை - Adobe Single-line Composer Adobe ஒற்றை வரி அமைப்பி - Adobe Every-line Composer Adobe ஒவ்வொரு வரி அமைப்பி Word Spacing சொல் இடைவெளி Letter Spacing எழுத்து இடைவெளி Glyph Scaling குறியுரு அளவீடு @@ -3126,7 +3123,6 @@ curves Smooth மென்மையாக்கு Intersect with இதனுடன் வெட்டிக்கொள் Capture Comp அமைப்பைப் பதிவுசெய் No Layer Comps அடுக்கு அமைப்புகள் இல்லை - Adobe PDF Presets… Adobe PDF முன்னமைவுகள்… 3D… 3D… Technology Previews… தொழில்நுட்ப முன்னோட்டங்கள்… Add a mask (from the selection; ⌥ inverts) மறைப்பை சேர் (தேர்விலிருந்து; ⌥ தலைகீழாக்கும்) @@ -3752,8 +3748,8 @@ layerLabel No Color நிறம் இல்லை Border எல்லை Box Blur பெட்டி மங்கல் Calculations கணக்கீடுகள் - Camera Raw கேமரா ரா - Camera Raw Filter கேமரா ரா வடிகட்டி + RAW Develop RAW உருவாக்கம் + RAW Develop Filter RAW உருவாக்கம் வடிகட்டி Channel1 சேனல்1 Channel2 சேனல்2 Channel3 சேனல்3 @@ -4273,3 +4269,6 @@ navigator Zoom பெரிதாக்கல் Transparent (default) ஒளிஊடுருவும் (இயல்புநிலை) The path was kept as the Work Path பாதை பணிப் பாதையாக வைக்கப்பட்டது The path was discarded பாதை நிராகரிக்கப்பட்டது + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW உருவாக்க அமைப்புகள் {file} இல் சேமிக்கப்பட்டன diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 36c0c6e3ae..9c6ce98f3d 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -13,10 +13,10 @@ const KA: fn() -> Lang = || Lang::from_code("ka").expect("ka registered"); fn hindi_has_the_reveal_and_camera_raw_rows() { assert_eq!(tr(HI(), "Reveal in Explorer"), "Explorer में दिखाएँ"); assert_eq!(tr(HI(), "Reveal in Finder"), "Finder में दिखाएँ"); - assert_eq!(tr(HI(), "Camera Raw…"), "Camera Raw…"); + assert_eq!(tr(HI(), "RAW Defaults…"), "RAW डिफ़ॉल्ट…"); let (rows, errors) = parse_entries(include_str!("hi.tsv")); assert!(errors.is_empty(), "{errors:?}"); - assert!(rows.iter().any(|(ctx, src, _)| ctx.is_empty() && src == "Camera Raw…"), "Camera Raw… is a catalog row, not a fallback"); + assert!(rows.iter().any(|(ctx, src, _)| ctx.is_empty() && src == "RAW Defaults…"), "RAW Defaults… is a catalog row, not a fallback"); } #[test] @@ -568,3 +568,14 @@ fn bundled_catalogs_are_consistent() { } } } + +#[test] +fn raw_develop_labels_are_translated_in_every_shipped_catalog() { + for language in LANGUAGES.iter().skip(1) { + let (entries, errors) = parse_entries(&language.text()); + assert!(errors.is_empty(), "{}: {errors:?}", language.code); + for source in ["RAW Develop", "RAW Develop Filter", "RAW Develop Filter…", "RAW Defaults", "RAW Defaults…"] { + assert!(entries.iter().any(|(_, key, value)| key == source && !value.is_empty()), "{}: {source}", language.code); + } + } +} diff --git a/crates/ui-egui/src/i18n/th.tsv b/crates/ui-egui/src/i18n/th.tsv index 83f23d4fc1..bcb6a917bb 100644 --- a/crates/ui-egui/src/i18n/th.tsv +++ b/crates/ui-egui/src/i18n/th.tsv @@ -342,7 +342,7 @@ Last Filter ฟิลเตอร์ล่าสุด Filter Gallery… แกลเลอรีฟิลเตอร์… Liquify… ทำให้เหลว… - Camera Raw Filter… ฟิลเตอร์ Camera Raw… + RAW Develop Filter… ฟิลเตอร์ การปรับแต่ง RAW… Adaptive Wide Angle… มุมกว้างแบบปรับได้… Lens Correction… การแก้ไขเลนส์… Vanishing Point… จุดลับสายตา… @@ -861,7 +861,7 @@ Working Black Plate จานดำทำงาน Working Gray Plate แผ่นสีเทาทำงาน -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs Basic ขั้นพื้นฐาน Detail รายละเอียด HSL/Grayscale HSL/ระดับสีเทา @@ -891,8 +891,8 @@ Luminance Smoothness ความนุ่มนวลของความสว่าง Vignetting วิกเนต White Balance: As Shot สมดุลแสงขาว: เท่าที่ถูกถ่าย - Camera Raw… กล้องดิบ… - Camera Raw isn't open Camera Raw ไม่เปิด + RAW Defaults… ค่าเริ่มต้น RAW… + RAW Develop isn't open การปรับแต่ง RAW ไม่เปิด Dehaze ลดหมอกควัน Texture พื้นผิว Focal Length ทางยาวโฟกัส @@ -1163,8 +1163,6 @@ Roman Hanging Punctuation เครื่องหมายวรรคตอนแขวนโรมัน Avoid Widows/Orphans หลีกเลี่ยงแม่ม่าย/เด็กกำพร้า Compose เขียน - Adobe Single-line Composer Adobe นักแต่งเพลงบรรทัดเดียว - Adobe Every-line Composer Adobe นักแต่งเพลงทุกบรรทัด Justification การให้เหตุผล Word Spacing การเว้นวรรคคำ Letter Spacing การเว้นวรรคจดหมาย @@ -1743,8 +1741,8 @@ Load Settings… โหลดการตั้งค่า… Save these settings as a Camera Raw .xmp file บันทึกการตั้งค่าเหล่านี้เป็นไฟล์ Camera Raw .xmp Load settings from a Camera Raw .xmp file โหลดการตั้งค่าจากไฟล์ Camera Raw .xmp - Loaded Camera Raw settings from {file} โหลดการตั้งค่า Camera Raw จาก {file} - Loaded Camera Raw settings from {file} ({n} not supported) โหลดการตั้งค่า Camera Raw จาก {file} (ไม่รองรับ {n}) + Loaded RAW Develop settings from {file} โหลดการตั้งค่า การปรับแต่ง RAW จาก {file} + Loaded RAW Develop settings from {file} ({n} not supported) โหลดการตั้งค่า การปรับแต่ง RAW จาก {file} (ไม่รองรับ {n}) After (X) หลัง (เอ็กซ์) Original ต้นฉบับ Current ปัจจุบัน @@ -2328,7 +2326,7 @@ CPU (no GPU acceleration) CPU (ไม่มีการเร่งความเร็ว GPU) Cache levels ระดับแคช Cache tile size ขนาดไทล์แคช - Camera Raw Defaults ค่าเริ่มต้นCamera Raw + RAW Defaults ค่าเริ่มต้น RAW Canvas border ขอบผ้าใบ Show canvas dots แสดงจุดผ้าใบ Clip thumbnails to layer bounds คลิปภาพขนาดย่อให้เป็นขอบเขตของเลเยอร์ @@ -2415,7 +2413,6 @@ Never ไม่เคย Normal tip ทิปปกติ Open as smart object เปิดเป็นวัตถุอัจฉริยะ - Open in camera raw เปิดในกล้องดิบ Open documents as tabs เปิดเอกสารเป็นแท็บ OpenGL OpenGL Orange ส้ม @@ -2557,9 +2554,9 @@ Tone Histogram โทนฮิสโตแกรม Show Selected Region แสดงภูมิภาคที่เลือก cameraRaw Light เบา -# Camera Raw: contextual controls and window title - Camera Raw Filter ({layer}) ฟิลเตอร์ Camera Raw ({layer}) - Camera Raw ({name}) กล้องดิบ ({name}) +# RAW Develop: contextual controls and window title + RAW Develop Filter ({layer}) ฟิลเตอร์ การปรับแต่ง RAW ({layer}) + RAW Develop ({name}) การปรับแต่ง RAW ({name}) Aqua อควา cameraRaw Amount จำนวน cameraRaw Blacks คนผิวดำ @@ -3367,7 +3364,7 @@ curves Smooth เรียบเนียน {name} was changed by another app after it was opened or saved here. {name} ถูกเปลี่ยนโดยแอปอื่นหลังจากเปิดหรือบันทึกที่นี่ Replace it with this document, or cancel and use File › Save As to keep both. แทนที่ด้วยเอกสารนี้ หรือยกเลิกและใช้ไฟล์ › บันทึกเป็นเพื่อเก็บทั้งสองอย่าง -# Dynamic UI labels (fourth pass): filter and adjustment parameters, Camera Raw panels, +# Dynamic UI labels (fourth pass): filter and adjustment parameters, RAW Develop panels, # lighting, History/Layers/paths/channels menus, metadata, System Info, status templates and # dialog text that other catalogs already carry. Written from the meaning of the English labels # in the ordinary Russian graphics-editor vocabulary; no proprietary resource consulted. @@ -3393,13 +3390,11 @@ curves Smooth เรียบเนียน Adjustment Layers เลเยอร์ปรับแต่ง Adjustment Properties คุณสมบัติการปรับ Adjustment layers have nothing to transform เลเยอร์การปรับแต่งไม่มีอะไรจะเปลี่ยนแปลง - Adobe PDF Presets… ค่าที่ตั้งล่วงหน้า Adobe PDF… Adobe-rgb-compat Adobe-rgb-compat Adwaita (Dark) แอดเวตา (ความมืด) Adwaita (Light) อัดเวตา (ธาตุเบา) After หลังจากนั้น Airbrush: keeps painting while the pointer rests. พู่กัน: คงการวาดภาพในขณะที่ตัวชี้วางอยู่ - All shortcuts reset to Photoshop defaults. ทางลัดทั้งหมดรีเซ็ตเป็นค่าเริ่มต้นของ Photoshop Altitude ระดับความสูง Ambience บรรยากาศ Ambient สิ่งแวดล้อม @@ -3484,8 +3479,8 @@ curves Smooth เรียบเนียน Brush Type ประเภทแปรง Burlap ผ้ากระสอบ Calculations การคำนวณ - Camera Raw กล้องดิบ - Camera Raw Filter ฟิลเตอร์ Camera Raw + RAW Develop การปรับแต่ง RAW + RAW Develop Filter ฟิลเตอร์ การปรับแต่ง RAW Cancel transform ยกเลิกการแปลง Candle Light แสงเทียน Canvas Size ขนาดผ้าใบ @@ -3632,7 +3627,6 @@ curves Smooth เรียบเนียน Deep Yellow สีเหลืองเข้ม Default Foreground and Background Colors สีพื้นหน้าและพื้นหลังเริ่มต้น Default Leaves ใบเริ่มต้น - Default Photoshop Size ขนาด Photoshop เริ่มต้น Defaults ค่าเริ่มต้น Define Brush Preset กำหนดพรีเซ็ตแปรง Define Custom Shape กำหนดรูปร่างที่กำหนดเอง @@ -4735,9 +4729,9 @@ shape Appearance ลักษณะที่ปรากฏ @plural {n} document|{n} documents {n} เอกสาร @plural {n} pixel|{n} pixels {n} พิกเซล cameraRaw Before (Y) ก่อน (ญ) -cameraRaw Camera Raw ({name}) กล้องดิบ ({name}) -cameraRaw Camera Raw Filter ({layer}) ฟิลเตอร์ Camera Raw ({layer}) -cameraRaw Camera Raw isn't open Camera Raw ไม่เปิด +cameraRaw RAW Develop ({name}) การปรับแต่ง RAW ({name}) +cameraRaw RAW Develop Filter ({layer}) ฟิลเตอร์ การปรับแต่ง RAW ({layer}) +cameraRaw RAW Develop isn't open การปรับแต่ง RAW ไม่เปิด cameraRaw Cancel ยกเลิก cameraRaw Cancelled opening {name} ยกเลิกการเปิด {name} cameraRaw Cancelled {label} ยกเลิก {label} @@ -4749,7 +4743,7 @@ cameraRaw Highlight Clipping Warning (O) คำเตือนการตัด cameraRaw Highlight Priority เน้นลำดับความสำคัญ cameraRaw Load Settings… โหลดการตั้งค่า… cameraRaw Load settings from a Camera Raw .xmp file โหลดการตั้งค่าจากไฟล์ Camera Raw .xmp -cameraRaw Loaded Camera Raw settings from {file} โหลดการตั้งค่า Camera Raw จาก {file} +cameraRaw Loaded RAW Develop settings from {file} โหลดการตั้งค่า การปรับแต่ง RAW จาก {file} cameraRaw Noise Reduction ลดเสียงรบกวน cameraRaw OK ตกลง cameraRaw Open เปิด @@ -4773,3 +4767,6 @@ cameraRaw White Balance: As Shot สมดุลแสงขาว: เท่า Transparent (default) โปร่งใส (ค่าเริ่มต้น) The path was kept as the Work Path เก็บเส้นทางไว้เป็นเส้นทางการทำงานแล้ว The path was discarded ทิ้งเส้นทางแล้ว + +# RAW Develop feature labels + Saved RAW Develop settings to {file} บันทึกการตั้งค่าการปรับแต่ง RAW ไปยัง {file} แล้ว diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 4ba4f2915a..6674cfdfcb 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -251,7 +251,7 @@ Plugins… Eklentiler… Type… Metin… Enhanced Controls… Gelişmiş Kontroller… - Camera Raw… Camera Raw… + RAW Defaults… RAW Varsayılanları… Raw Defaults… Ham Varsayılanlar… Integrations… Entegrasyonlar… AI Integrations… Yapay Zeka Entegrasyonları… @@ -582,7 +582,7 @@ Last Filter Son Filtre Filter Gallery… Filtre Galerisi… Adaptive Wide Angle… Uyarlanabilir Geniş Açı… - Camera Raw Filter… Camera Raw Filtresi… + RAW Develop Filter… RAW Geliştirme Filtresi… Liquify… Sıvılaştır… Vanishing Point… Ufuk Noktası… Blur Bulanıklaştırma @@ -948,7 +948,7 @@ Brush Reconstruct Options Fırçayla Yeniden Yapılandırma Seçenekleri Brush Tool Options Fırça Aracı Seçenekleri Cache Level: Önbellek Düzeyi: - Camera Raw isn't open Camera Raw açık değil + RAW Develop isn't open RAW Geliştirme açık değil Cancel İptal Reset Sıfırla Cancel (Esc) İptal (Esc) @@ -1914,7 +1914,7 @@ Brush preview color Fırça önizleme rengi Cache levels Önbellek düzeyleri Cache tile size Önbellek kutucuğu boyutu - Camera Raw Defaults Camera Raw Varsayılanları + RAW Defaults RAW Varsayılanları Canvas border Tuval kenarlığı Show canvas dots Tuval noktalarını göster Clip thumbnails to layer bounds Küçük resimleri katman sınırlarına kırp @@ -2001,7 +2001,6 @@ Never Asla Normal tip Normal uç Open as smart object Akıllı nesne olarak aç - Open in camera raw Camera raw'da aç Open documents as tabs Belgeleri sekmeler halinde aç Overscroll Aşırı kaydırma Performance Performans @@ -2352,8 +2351,8 @@ 3 x 3 3 x 3 4 x 4 4 x 4 5 x 5 5 x 5 - Camera Raw Filter ({layer}) Camera Raw Filtresi ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) RAW Geliştirme Filtresi ({layer}) + RAW Develop ({name}) RAW Geliştirme ({name}) Edit Type Metni Düzenle Grid: Izgara: Highlight Clipping Warning (O) Parlak Ton Kırpma Uyarısı (O) @@ -3354,7 +3353,6 @@ cameraRaw Color Renk Add Pins Pim Ekle Add a mask (from the selection; ⌥ inverts) Bir maske ekleyin (seçimden; ⌥ tersine çevirir) Adds grain to the soft edges of the brush tip. Fırça ucunun yumuşak kenarlarına gren ekler. - Adobe PDF Presets… Adobe PDF Ön Ayarları… Advanced Blending Gelişmiş Karıştırma After (X) Sonra (X) Airbrush: keeps painting while the pointer rests. Airbrush: İşaretçi dururken boyamaya devam eder. @@ -3381,8 +3379,8 @@ cameraRaw Color Renk Border Kenarlık Box Blur Kutu Bulanıklığı Calculations Hesaplamalar - Camera Raw Camera Raw - Camera Raw Filter Camera Raw Filtresi + RAW Develop RAW Geliştirme + RAW Develop Filter RAW Geliştirme Filtresi Canvas rotation Tuval döndürme Channel1 Kanal 1 Channel2 Kanal 2 @@ -3665,8 +3663,6 @@ cameraRaw Whites Beyazlar Mac Crisp Mac Net Mac Strong Mac Güçlü Mac Smooth Mac Yumuşak - Adobe Single-line Composer Adobe Tek Satırlı Dizgi Motoru - Adobe Every-line Composer Adobe Tüm Satırlı Dizgi Motoru X X Y Y 30 fps 30 fps @@ -4002,8 +3998,8 @@ cameraData Lens Lens Load Settings… Ayarları Yükle… Save these settings as a Camera Raw .xmp file Bu ayarları Camera Raw .xmp dosyası olarak kaydet Load settings from a Camera Raw .xmp file Ayarları bir Camera Raw .xmp dosyasından yükle - Loaded Camera Raw settings from {file} Camera Raw ayarları {file} dosyasından yüklendi - Loaded Camera Raw settings from {file} ({n} not supported) Camera Raw ayarları {file} dosyasından yüklendi ({n} desteklenmiyor) + Loaded RAW Develop settings from {file} RAW Geliştirme ayarları {file} dosyasından yüklendi + Loaded RAW Develop settings from {file} ({n} not supported) RAW Geliştirme ayarları {file} dosyasından yüklendi ({n} desteklenmiyor) Auto Add/Delete Otomatik Ekle/Sil Don't also tick Mirror Image in Print Settings…: the two flips cancel out. Yazdırma Ayarlarında ayrıca Ayna Görüntüsünü açmayın: iki yansıtma birbirini iptal eder. Print Settings… Yazdırma Ayarları… @@ -4349,7 +4345,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Üzerine gelince katman sınırlarını göster Expand layer group on click Tıklayınca katman grubunu genişlet Show hover bounds from Layers Katmanlar'dan üzerine gelme sınırlarını göster - Saved Camera Raw settings to {file} Camera Raw ayarları {file} dosyasına kaydedildi + Saved RAW Develop settings to {file} RAW Geliştirme ayarları {file} dosyasına kaydedildi Save the settings to each raw's sidecar without opening it Ayarları her raw dosyasının yan dosyasına kaydet, açmadan No settings saved: these raws can't keep a sidecar here Hiçbir şey kaydedilmedi: bu raw dosyaları burada yan dosyaya sahip olamaz Some settings could not be saved; the raws stay open Bazı ayarlar kaydedilemedi; raw dosyaları açık kalıyor diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 48902ce232..bb02201b34 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -57,7 +57,7 @@ # Filters and adjustments dialogs -# Camera Raw and lens dialogs +# RAW Develop and lens dialogs # Adjustments panel @@ -116,7 +116,7 @@ # Preference dialog: generated setting labels and dropdown choices # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title @@ -494,7 +494,7 @@ Last Filter Останній фільтр Filter Gallery… Галерея фільтрів… Liquify… Пластика… - Camera Raw Filter… Фільтр Camera Raw… + RAW Develop Filter… Фільтр Обробка RAW… Adaptive Wide Angle… Адаптивний широкий кут… Lens Correction… Корекція об'єктива… Vanishing Point… Точка сходження… @@ -1026,8 +1026,8 @@ Luminance Smoothness Плавність яскравості Vignetting Віньєтування White Balance: As Shot Баланс білого: як під час знімання - Camera Raw… Camera Raw… - Camera Raw isn't open Camera Raw не відкрито + RAW Defaults… Типові параметри RAW… + RAW Develop isn't open Обробка RAW не відкрито Dehaze Усунення серпанку Texture Текстура Focal Length Фокусна відстань @@ -1283,8 +1283,6 @@ Roman Hanging Punctuation Висяча латинська пунктуація Avoid Widows/Orphans Уникати висячих рядків Compose Компонування - Adobe Single-line Composer Однорядковий компонувальник Adobe - Adobe Every-line Composer Багаторядковий компонувальник Adobe Justification Вирівнювання по ширині Word Spacing Інтервал між словами Letter Spacing Інтервал між літерами @@ -1842,8 +1840,8 @@ Load Settings… Завантажити налаштування… Save these settings as a Camera Raw .xmp file Зберегти ці налаштування у файл Camera Raw .xmp Load settings from a Camera Raw .xmp file Завантажити налаштування з файлу Camera Raw .xmp - Loaded Camera Raw settings from {file} Налаштування Camera Raw завантажено з {file} - Loaded Camera Raw settings from {file} ({n} not supported) Налаштування Camera Raw завантажено з {file} (не підтримується: {n}) + Loaded RAW Develop settings from {file} Налаштування Обробка RAW завантажено з {file} + Loaded RAW Develop settings from {file} ({n} not supported) Налаштування Обробка RAW завантажено з {file} (не підтримується: {n}) After (X) Після (X) Original Оригінал Current Поточний @@ -2409,7 +2407,7 @@ CPU (no GPU acceleration) CPU (без прискорення GPU) Cache levels Рівні кешу Cache tile size Розмір плитки кешу - Camera Raw Defaults Типові параметри Camera Raw + RAW Defaults Типові параметри RAW Canvas border Межа полотна Show canvas dots Показувати крапки полотна Clip thumbnails to layer bounds Обрізати мініатюри до меж шару @@ -2501,7 +2499,6 @@ Never Ніколи Normal tip Звичайний кінчик Open as smart object Відкривати як смартоб'єкт - Open in camera raw Відкривати в Camera Raw Open documents as tabs Відкривати документи у вкладках OpenGL OpenGL Orange Оранжевий @@ -2639,8 +2636,8 @@ Tone Histogram Тонова гістограма Show Selected Region Показувати вибрану область cameraRaw Light Світло - Camera Raw Filter ({layer}) Фільтр Camera Raw ({layer}) - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop Filter ({layer}) Фільтр Обробка RAW ({layer}) + RAW Develop ({name}) Обробка RAW ({name}) Aqua Аквамариновий cameraRaw Amount Величина cameraRaw Blacks Чорні тони @@ -3365,7 +3362,7 @@ cameraRaw Masking Маскування Color Settings Налаштування кольору Assign Profile Призначити профіль Convert to Profile Перетворити на профіль - Camera Raw Camera Raw + RAW Develop Обробка RAW Raw Defaults Типові параметри Raw AI Integrations Інтеграції ШІ Install Plug-in Установити плагін @@ -3412,7 +3409,7 @@ cameraRaw Masking Маскування Border Межа Contract Стиснути Filter Gallery Галерея фільтрів - Camera Raw Filter Фільтр Camera Raw + RAW Develop Filter Фільтр Обробка RAW Liquify Пластика Vanishing Point Точка сходження Field Blur Розмиття поля @@ -3652,7 +3649,6 @@ cameraRaw Masking Маскування @id filter.sharpen.sharpen Підвищити різкість Good Добра Best Найкраща - Adobe PDF Presets… Набори Adobe PDF… 3D… 3D… Technology Previews… Попередній перегляд технологій… Background from Layer Фон із шару @@ -4329,7 +4325,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Показувати межі шару під час наведення Expand layer group on click Розгортати групу шарів за клацанням Show hover bounds from Layers Показувати межі під час наведення з панелі «Шари» - Saved Camera Raw settings to {file} Налаштування Camera Raw збережено в {file} + Saved RAW Develop settings to {file} Налаштування Обробка RAW збережено в {file} Save the settings to each raw's sidecar without opening it Зберегти налаштування в супровідний файл кожного raw, не відкриваючи його No settings saved: these raws can't keep a sidecar here Нічого не збережено: ці raw тут не можуть мати супровідного файлу Some settings could not be saved; the raws stay open Не вдалося зберегти деякі налаштування; raw залишаються відкритими diff --git a/crates/ui-egui/src/i18n/ur.tsv b/crates/ui-egui/src/i18n/ur.tsv index a6cadc2114..75d773c7c4 100644 --- a/crates/ui-egui/src/i18n/ur.tsv +++ b/crates/ui-egui/src/i18n/ur.tsv @@ -224,7 +224,7 @@ Plug-ins… پلگ انز… Type… متن… Enhanced Controls… بہتر کنٹرولز… - Camera Raw… کیمرہ را… + RAW Defaults… RAW ڈیفالٹس… Raw Defaults… را ڈیفالٹس… Integrations… انضمام… AI Integrations… AI انضمام… @@ -554,7 +554,7 @@ Last Filter آخری فلٹر Filter Gallery… فلٹر گیلری… Adaptive Wide Angle… اڈاپٹیو وائیڈ اینگل… - Camera Raw Filter… کیمرہ را فلٹر… + RAW Develop Filter… RAW ڈیولپمنٹ فلٹر… Liquify… لیکویفائی… Vanishing Point… وینشنگ پوائنٹ… Blur دھندلا پن @@ -902,8 +902,8 @@ Load Settings… ترتیبات لوڈ کریں… Save these settings as a Camera Raw .xmp file ان ترتیبات کو کیمرہ را .xmp فائل کے طور پر محفوظ کریں Load settings from a Camera Raw .xmp file کیمرہ را .xmp فائل سے ترتیبات لوڈ کریں - Loaded Camera Raw settings from {file} {file} سے کیمرہ را ترتیبات لوڈ ہو گئیں - Loaded Camera Raw settings from {file} ({n} not supported) {file} سے کیمرہ را ترتیبات لوڈ ہو گئیں ({n} سپورٹڈ نہیں) + Loaded RAW Develop settings from {file} {file} سے RAW ڈیولپمنٹ ترتیبات لوڈ ہو گئیں + Loaded RAW Develop settings from {file} ({n} not supported) {file} سے RAW ڈیولپمنٹ ترتیبات لوڈ ہو گئیں ({n} سپورٹڈ نہیں) Begin recording ریکارڈنگ شروع کریں Bend: موڑ: Bicubic بائی کیوبک @@ -931,7 +931,7 @@ Brush Reconstruct Options برش ری کنسٹرکٹ کے اختیارات Brush Tool Options برش ٹول کے اختیارات Cache Level: کیشے لیول: - Camera Raw isn't open کیمرہ را کھلا نہیں ہے + RAW Develop isn't open RAW ڈیولپمنٹ کھلا نہیں ہے Cancel منسوخ کریں Cancel (Esc) منسوخ کریں (Esc) Manage submitted jobs in the system print queue سسٹم پرنٹ قطار میں جمع شدہ کام منظم کریں @@ -1902,7 +1902,7 @@ Brush preview color برش پیش منظر کا رنگ Cache levels کیشے لیولز Cache tile size کیشے ٹائل حجم - Camera Raw Defaults کیمرہ را ڈیفالٹس + RAW Defaults RAW ڈیفالٹس Canvas border کینوس بارڈر Show canvas dots کینوس نقطے دکھائیں Clip thumbnails to layer bounds تھمب نیلز کو تہہ کی حدود میں کلپ کریں @@ -1984,7 +1984,6 @@ Never کبھی نہیں Normal tip نارمل ٹپ Open as smart object سمارٹ آبجیکٹ کے طور پر کھولیں - Open in camera raw کیمرہ را میں کھولیں Open documents as tabs دستاویزات کو ٹیبز کے طور پر کھولیں Overscroll اوور اسکرول Performance کارکردگی @@ -2345,8 +2344,8 @@ Tone Histogram ٹون ہسٹوگرام Show Selected Region منتخب خطہ دکھائیں cameraRaw Light روشنی - Camera Raw Filter ({layer}) کیمرہ را فلٹر ({layer}) - Camera Raw ({name}) کیمرہ را ({name}) + RAW Develop Filter ({layer}) RAW ڈیولپمنٹ فلٹر ({layer}) + RAW Develop ({name}) RAW ڈیولپمنٹ ({name}) cameraRaw Lights روشن حصے cameraRaw Darks تاریک حصے cameraRaw Red سرخ @@ -2943,8 +2942,6 @@ curves Smooth ہموار Roman Hanging Punctuation رومن ہینگنگ رموز اوقاف Avoid Widows/Orphans ودوز/اورفنز سے گریز کریں Compose کمپوز کریں - Adobe Single-line Composer Adobe سنگل لائن کمپوزر - Adobe Every-line Composer Adobe ایوری لائن کمپوزر Word Spacing لفظ کا وقفہ Letter Spacing حرف کا وقفہ Glyph Scaling گلف اسکیلنگ @@ -3140,7 +3137,6 @@ curves Smooth ہموار Intersect with کے ساتھ جوڑیں Capture Comp کمپوزیشن قبضہ کریں No Layer Comps کوئی تہہ کمپوزیشن نہیں - Adobe PDF Presets… Adobe PDF پری سیٹس… 3D… 3D… Technology Previews… ٹیکنالوجی پیش منظر… Add a mask (from the selection; ⌥ inverts) ماسک شامل کریں (انتخاب سے؛ ⌥ الٹ دیتا ہے) @@ -3757,8 +3753,8 @@ layerLabel No Color بلا رنگ Border بارڈر Box Blur باکس دھندلاپن Calculations حسابات - Camera Raw کیمرہ را - Camera Raw Filter کیمرہ را فلٹر + RAW Develop RAW ڈیولپمنٹ + RAW Develop Filter RAW ڈیولپمنٹ فلٹر Channel1 چینل1 Channel2 چینل2 Channel3 چینل3 @@ -4572,3 +4568,6 @@ navigator Zoom زوم @plural {n} action file loaded|{n} action files loaded {n} ایکشن فائل لوڈ ہوئی|{n} ایکشن فائلیں لوڈ ہوئیں @plural {n} file could not be loaded: {errors}|{n} files could not be loaded: {errors} {n} فائل لوڈ نہیں ہو سکی: {errors}|{n} فائلیں لوڈ نہیں ہو سکیں: {errors} @plural {what}: {n} Image Assets output failed|{what}: {n} Image Assets outputs failed {what}: {n} تصویری اثاثہ آؤٹ پٹ ناکام ہوا|{what}: {n} تصویری اثاثے آؤٹ پٹس ناکام ہوئے + +# RAW Develop feature labels + Saved RAW Develop settings to {file} RAW ڈیولپمنٹ کی ترتیبات {file} میں محفوظ ہو گئیں diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index aab2ceaf57..684e4efd51 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -62,7 +62,7 @@ # Mixer Brush (required for every registered non-English language) -# Camera Raw labels (required for every registered non-English language) +# RAW Develop labels (required for every registered non-English language) # Phase 4.1 — Preferences dialog @@ -75,13 +75,13 @@ # Phase 4.5 — Preset Manager + Export/Import Presets -# Phase 4.6 — Camera Raw chrome + Light/Color basics (tone, WB, presence) +# Phase 4.6 — RAW Develop chrome + Light/Color basics (tone, WB, presence) -# Phase 4.7 — Camera Raw Curve + Color Mixer +# Phase 4.7 — RAW Develop Curve + Color Mixer -# Phase 4.8 — Camera Raw Color Grading + Detail +# Phase 4.8 — RAW Develop Color Grading + Detail -# Phase 4.10 — Camera Raw Effects (Texture/Clarity/Dehaze + Vignetting + Grain) +# Phase 4.10 — RAW Develop Effects (Texture/Clarity/Dehaze + Vignetting + Grain) # Phase 4.13 — New Document + Home + Image Size @@ -289,7 +289,7 @@ Puppet Warp Biến dạng con rối Purge Dọn Quick Export as PNG Xuất nhanh dạng PNG - Raw Defaults… Mặc định Camera Raw… + Raw Defaults… Mặc định RAW… Redo Làm lại Remove Warp Split Gỡ tách biến dạng Render Video… Xuất video… @@ -630,7 +630,7 @@ Blur Gallery Thư viện làm mờ Blur More Làm mờ thêm Box Blur… Làm mờ hộp… - Camera Raw Filter… Bộ lọc Camera Raw… + RAW Develop Filter… Bộ lọc Xử lý RAW… Clouds Mây Color Halftone… Bán tông màu… Convert for Smart Filters Chuyển cho bộ lọc thông minh @@ -1449,13 +1449,13 @@ Load Settings… Tải cài đặt… Save these settings as a Camera Raw .xmp file Lưu các cài đặt này thành tệp .xmp Camera Raw Load settings from a Camera Raw .xmp file Tải cài đặt từ tệp .xmp Camera Raw - Loaded Camera Raw settings from {file} Đã tải cài đặt Camera Raw từ {file} - Loaded Camera Raw settings from {file} ({n} not supported) Đã tải cài đặt Camera Raw từ {file} ({n} không được hỗ trợ) + Loaded RAW Develop settings from {file} Đã tải cài đặt Xử lý RAW từ {file} + Loaded RAW Develop settings from {file} ({n} not supported) Đã tải cài đặt Xử lý RAW từ {file} ({n} không được hỗ trợ) Blacks Điểm đen Blending Pha trộn Blue Xanh dương - Camera Raw Filter ({layer}) Bộ lọc Camera Raw ({layer}) - Camera Raw isn't open Camera Raw chưa mở + RAW Develop Filter ({layer}) Bộ lọc Xử lý RAW ({layer}) + RAW Develop isn't open Xử lý RAW chưa mở Cancel Hủy Clarity Độ rõ Color Màu @@ -1551,7 +1551,7 @@ cameraRaw Shadows Vùng tối Both Cả hai Brush picker Bộ chọn cọ Cache tile size Kích thước ô đệm - Camera Raw Defaults Mặc định Camera Raw + RAW Defaults Mặc định RAW Canvas border Viền canvas Canvas color Màu canvas Canvas custom color Màu canvas tùy chỉnh @@ -1747,7 +1747,6 @@ cameraRaw Shadows Vùng tối Default restored. Đã khôi phục mặc định. Delete Shortcut Xóa phím tắt Reset All to Defaults Đặt lại tất cả về mặc định - All shortcuts reset to Photoshop defaults. Tất cả phím tắt đã được đặt lại về mặc định Photoshop. Show All Menu Items Hiện tất cả mục menu Restore Defaults Khôi phục mặc định Visible Hiện @@ -1809,7 +1808,7 @@ cameraRaw Shadows Vùng tối Export Presets Xuất thiết lập sẵn Import Presets Nhập thiết lập sẵn Fit in View Vừa khung nhìn - Camera Raw Camera Raw + RAW Develop Xử lý RAW cameraRaw Color Màu cameraRaw Effects Hiệu ứng cameraRaw Whites Điểm trắng @@ -1872,7 +1871,6 @@ cameraRaw Size Kích thước White Trắng Transparent Trong suốt Portrait Dọc - Default Photoshop Size Kích thước Photoshop mặc định document Orientation Hướng trang Image Size Kích thước ảnh Image Size: Kích thước ảnh: @@ -2094,7 +2092,7 @@ layers Fill: Độ tô: Scope Phạm vi Selected Đã chọn Open Mở - Camera Raw ({name}) Camera Raw ({name}) + RAW Develop ({name}) Xử lý RAW ({name}) Developing {name} Đang xử lý {name} 101 by 101 Average Trung bình 101 × 101 11 by 11 Average Trung bình 11 × 11 @@ -2637,7 +2635,7 @@ shape Appearance Diện mạo Delete and Fill Selection Xoá và tô vùng chọn Transform Again on a Copy Biến đổi lại trên một bản sao General… Chung… - Camera Raw… Camera Raw… + RAW Defaults… Mặc định RAW… Integrations… Tích hợp… Stamp Visible Đóng dấu lớp hiện thấy Select Layer Above Chọn lớp phía trên @@ -2811,7 +2809,6 @@ shape Appearance Diện mạo Missing glyph protection Bảo vệ khi thiếu glyph Modern Hiện đại Open as smart object Mở dưới dạng đối tượng thông minh - Open in camera raw Mở trong camera raw Open documents as tabs Mở tài liệu dưới dạng thẻ Print resolution Độ phân giải in Pro light Pro sáng @@ -3043,7 +3040,7 @@ cameraData Lens Ống kính Burn Làm tối Calculations Tính toán Camera Calibration Hiệu chuẩn máy ảnh - Camera Raw Filter Bộ lọc Camera Raw + RAW Develop Filter Bộ lọc Xử lý RAW Candle Light Ánh nến Canvas Size Kích thước vùng vẽ Caption Chú thích @@ -4123,7 +4120,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover Hiện ranh giới lớp khi di chuột Expand layer group on click Mở rộng nhóm lớp khi nhấp Show hover bounds from Layers Hiện ranh giới khi di chuột từ bảng Lớp - Saved Camera Raw settings to {file} Đã lưu cài đặt Camera Raw vào {file} + Saved RAW Develop settings to {file} Đã lưu cài đặt Xử lý RAW vào {file} Save the settings to each raw's sidecar without opening it Lưu thiết lập vào tệp sidecar của từng ảnh raw mà không mở No settings saved: these raws can't keep a sidecar here Không lưu được gì: các ảnh raw này không thể có tệp sidecar ở đây Some settings could not be saved; the raws stay open Không thể lưu một số cài đặt; các ảnh raw vẫn mở diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index c3c39afc00..7df8f0f93b 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -26,7 +26,7 @@ # Layers-panel trash confirmation -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title # Current shell labels and shortcut templates. Keep {key} platform-dependent. # Gradient Editor window, opened from the options bar's gradient swatch. # Layer navigation, copy transforms and cancellable opening (labels added on main since this catalog). @@ -303,7 +303,6 @@ Histories 历史记录 Video Cache 视频缓存 All 全部 - Adobe PDF Presets… Adobe PDF 预设… Presets 预设 Preset Manager… 预设管理器… Migrate Presets 迁移预设 @@ -334,7 +333,7 @@ 3D… 3D… Enhanced Controls… 增强控件… Technology Previews… 技术预览… - Camera Raw… Camera Raw… + RAW Defaults… RAW 默认设置… Raw Defaults… Raw 默认设置… Integrations… 集成… AI Integrations… AI 集成… @@ -669,7 +668,7 @@ Last Filter 上次滤镜 Filter Gallery… 滤镜库… Adaptive Wide Angle… 自适应广角… - Camera Raw Filter… Camera Raw 滤镜… + RAW Develop Filter… RAW 显影 滤镜… Liquify… 液化… Vanishing Point… 消失点… Blur 模糊 @@ -1041,8 +1040,8 @@ Load Settings… 载入设置… Save these settings as a Camera Raw .xmp file 将这些设置存储为 Camera Raw .xmp 文件 Load settings from a Camera Raw .xmp file 从 Camera Raw .xmp 文件载入设置 - Loaded Camera Raw settings from {file} 已从 {file} 载入 Camera Raw 设置 - Loaded Camera Raw settings from {file} ({n} not supported) 已从 {file} 载入 Camera Raw 设置({n} 项不支持) + Loaded RAW Develop settings from {file} 已从 {file} 载入 RAW 显影 设置 + Loaded RAW Develop settings from {file} ({n} not supported) 已从 {file} 载入 RAW 显影 设置({n} 项不支持) Begin recording 开始录制 Bend: 弯曲: Bicubic 双三次 @@ -1070,7 +1069,7 @@ Brush Reconstruct Options 画笔重建选项 Brush Tool Options 画笔工具选项 Cache Level: 缓存级别: - Camera Raw isn't open 尚未打开 Camera Raw + RAW Develop isn't open 尚未打开 RAW 显影 Cancel 取消 Cancel (Esc) 取消(Esc) Manage submitted jobs in the system print queue 在系统打印队列中管理已提交的作业 @@ -2066,7 +2065,7 @@ Brush preview color 画笔预览颜色 Cache levels 缓存级别 Cache tile size 缓存图块大小 - Camera Raw Defaults Camera Raw 默认设置 + RAW Defaults RAW 默认设置 Canvas border 画布边框 Show canvas dots 显示画布圆点 Clip thumbnails to layer bounds 将缩略图裁剪到图层边界 @@ -2153,7 +2152,6 @@ Never 从不 Normal tip 正常笔尖 Open as smart object 作为智能对象打开 - Open in camera raw 在 Camera Raw 中打开 Open documents as tabs 以标签页打开文档 Overscroll 过度滚动 Performance 性能 @@ -2290,8 +2288,8 @@ Tone Histogram 色调直方图 Show Selected Region 显示选定区域 cameraRaw Light 光线 - Camera Raw Filter ({layer}) Camera Raw 滤镜({layer}) - Camera Raw ({name}) Camera Raw({name}) + RAW Develop Filter ({layer}) RAW 显影 滤镜({layer}) + RAW Develop ({name}) RAW 显影({name}) cameraRaw Lights 亮调 cameraRaw Darks 暗调 cameraRaw Blacks 黑色色阶 @@ -3310,7 +3308,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover 悬停时显示图层边界 Expand layer group on click 单击时展开图层组 Show hover bounds from Layers 显示来自图层面板的悬停边界 - Saved Camera Raw settings to {file} 已将 Camera Raw 设置保存到 {file} + Saved RAW Develop settings to {file} 已将 RAW 显影 设置保存到 {file} Save the settings to each raw's sidecar without opening it 将设置保存到每个 Raw 的附属文件,不打开它 No settings saved: these raws can't keep a sidecar here 未保存任何内容:这些 Raw 在此处无法拥有附属文件 Some settings could not be saved; the raws stay open 部分设置无法保存;Raw 保持打开 @@ -3322,3 +3320,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Auto-size Canvas 自动调整画布大小 Keep Relative Position During Layer Reordering 重新排列图层时保持相对位置 Shrinkwrap Canvas on Save 保存时将画布缩至内容大小 + +# RAW Develop feature labels + RAW Develop RAW 显影 + RAW Develop Filter RAW 显影滤镜 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 92f1bec136..39906afad6 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -34,7 +34,7 @@ # Gradient Editor window, opened from the options bar's gradient swatch. # Rendering mode and recovery -# Camera Raw: contextual controls and window title +# RAW Develop: contextual controls and window title @@ -333,7 +333,7 @@ Plugins… 增效模組… Type… 文字… Enhanced Controls… 增強控制項… - Camera Raw… Camera Raw… + RAW Defaults… RAW 預設值… Raw Defaults… Raw 預設值… Integrations… 整合… AI Integrations… AI 整合… @@ -668,7 +668,7 @@ Last Filter 上次濾鏡 Filter Gallery… 濾鏡收藏館… Adaptive Wide Angle… 最適化廣角… - Camera Raw Filter… Camera Raw 濾鏡… + RAW Develop Filter… RAW 顯影 濾鏡… Liquify… 液化… Vanishing Point… 消失點… Blur 模糊 @@ -1024,8 +1024,8 @@ Load Settings… 載入設定… Save these settings as a Camera Raw .xmp file 將這些設定儲存為 Camera Raw .xmp 檔案 Load settings from a Camera Raw .xmp file 從 Camera Raw .xmp 檔案載入設定 - Loaded Camera Raw settings from {file} 已從 {file} 載入 Camera Raw 設定 - Loaded Camera Raw settings from {file} ({n} not supported) 已從 {file} 載入 Camera Raw 設定({n} 項不支援) + Loaded RAW Develop settings from {file} 已從 {file} 載入 RAW 顯影 設定 + Loaded RAW Develop settings from {file} ({n} not supported) 已從 {file} 載入 RAW 顯影 設定({n} 項不支援) Begin recording 開始記錄 Bend: 彎曲: Bicubic 雙三次 @@ -1053,7 +1053,7 @@ Brush Reconstruct Options 筆刷重建選項 Brush Tool Options 筆刷工具選項 Cache Level: 快取層級: - Camera Raw isn't open Camera Raw 未開啟 + RAW Develop isn't open RAW 顯影 未開啟 Cancel 取消 Cancel (Esc) 取消 (Esc) Manage submitted jobs in the system print queue 在系統列印佇列中管理已提交的工作 @@ -2035,7 +2035,7 @@ Brush preview color 筆刷預視顏色 Cache levels 快取層級 Cache tile size 快取拼貼大小 - Camera Raw Defaults Camera Raw 預設值 + RAW Defaults RAW 預設值 Canvas border 畫布邊框 Show canvas dots 顯示畫布圓點 Clip thumbnails to layer bounds 將縮圖裁切至圖層邊界 @@ -2122,7 +2122,6 @@ Never 永不 Normal tip 一般筆尖 Open as smart object 以智慧型物件開啟 - Open in camera raw 在 Camera Raw 中開啟 Open documents as tabs 以索引標籤開啟文件 Overscroll 超出捲動 Performance 效能 @@ -2401,8 +2400,8 @@ Tone Histogram 色調直方圖 Show Selected Region 顯示選取區域 cameraRaw Light 光線 - Camera Raw Filter ({layer}) Camera Raw 濾鏡({layer}) - Camera Raw ({name}) Camera Raw({name}) + RAW Develop Filter ({layer}) RAW 顯影 濾鏡({layer}) + RAW Develop ({name}) RAW 顯影({name}) cameraRaw Lights 亮調 cameraRaw Darks 暗調 cameraRaw Blacks 黑色色階 @@ -3267,7 +3266,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Show layer bounds on hover 滑過時顯示圖層邊界 Expand layer group on click 按一下時展開圖層群組 Show hover bounds from Layers 顯示來自圖層面板的滑過邊界 - Saved Camera Raw settings to {file} 已將 Camera Raw 設定儲存到 {file} + Saved RAW Develop settings to {file} 已將 RAW 顯影 設定儲存到 {file} Save the settings to each raw's sidecar without opening it 將設定儲存到每個 Raw 的附屬檔案,不開啟它 No settings saved: these raws can't keep a sidecar here 未儲存任何內容:這些 Raw 在此處無法擁有附屬檔案 Some settings could not be saved; the raws stay open 部分設定無法儲存;Raw 保持開啟 @@ -3279,3 +3278,7 @@ smartSvg AI/PDF/EPS contents will be edited as SVG. Saving replaces the embedded Auto-size Canvas 自動調整版面尺寸 Keep Relative Position During Layer Reordering 重新排列圖層時保持相對位置 Shrinkwrap Canvas on Save 儲存時將版面縮至內容大小 + +# RAW Develop feature labels + RAW Develop RAW 顯影 + RAW Develop Filter RAW 顯影濾鏡 diff --git a/crates/ui-egui/src/menu_catalog.rs b/crates/ui-egui/src/menu_catalog.rs index 4c32159b31..d6db835eab 100644 --- a/crates/ui-egui/src/menu_catalog.rs +++ b/crates/ui-egui/src/menu_catalog.rs @@ -168,7 +168,7 @@ pub static CATALOG: &[(&[&str], &str, Option<&str>, &str)] = &[ (&["Edit", "Preferences"], "Type…", None, "edit.preferences.type"), (&["Edit", "Preferences"], "Enhanced Controls…", None, "edit.preferences.enhancedControls"), (&["Edit", "Preferences"], "---", None, "---"), - (&["Edit", "Preferences"], "Camera Raw…", None, "edit.preferences.rawDefaults"), + (&["Edit", "Preferences"], "RAW Defaults…", None, "edit.preferences.rawDefaults"), (&["Image", "Mode"], "Bitmap", None, "image.mode.bitmap"), (&["Image", "Mode"], "Grayscale", None, "image.mode.grayscale"), (&["Image", "Mode"], "Duotone", None, "image.mode.duotone"), @@ -571,7 +571,7 @@ pub static CATALOG: &[(&[&str], &str, Option<&str>, &str)] = &[ (&["Filter"], "Convert for Smart Filters", None, "filter.convertForSmartFilters"), (&["Filter"], "---", None, "---"), (&["Filter"], "Filter Gallery…", None, "filter.filterGallery"), - (&["Filter"], "Camera Raw Filter…", Some("Cmd+Shift+A"), "filter.cameraRaw"), + (&["Filter"], "RAW Develop Filter…", Some("Cmd+Shift+A"), "filter.cameraRaw"), (&["Filter"], "Adaptive Wide Angle…", Some("Cmd+Alt+Shift+A"), "filter.adaptiveWideAngle"), (&["Filter"], "Lens Correction…", Some("Cmd+Shift+R"), "filter.lensCorrection"), (&["Filter"], "Liquify…", Some("Cmd+Shift+X"), "filter.liquify"), diff --git a/crates/ui-egui/src/preferences_submenu_tests.rs b/crates/ui-egui/src/preferences_submenu_tests.rs index 65b54dc4eb..7050d385c0 100644 --- a/crates/ui-egui/src/preferences_submenu_tests.rs +++ b/crates/ui-egui/src/preferences_submenu_tests.rs @@ -1,4 +1,4 @@ -//! #11398: Edit › Preferences says "Plugins…" and "Camera Raw…" and has the reference +//! #11398: Edit › Preferences says "Plugins…" and "RAW Defaults…" and has the reference //! application's two separators (after the first entry and before Camera Raw…). use crate::menu_catalog::CATALOG; @@ -33,7 +33,7 @@ fn preferences_submenu_reads_in_the_reference_order_with_two_separators() { "Type…", "Enhanced Controls…", "---", - "Camera Raw…", + "RAW Defaults…", ] ); } @@ -76,12 +76,12 @@ fn engine_labels_match_the_catalogue_for_the_renamed_rows() { assert_eq!(engine, catalogue, "{id}"); } assert_eq!(photocraft_engine::commands::find("edit.preferences.plugIns").unwrap().label, "Plugins…"); - assert_eq!(photocraft_engine::commands::find("edit.preferences.rawDefaults").unwrap().label, "Camera Raw…"); + assert_eq!(photocraft_engine::commands::find("edit.preferences.rawDefaults").unwrap().label, "RAW Defaults…"); } #[test] fn preferences_dialog_page_names_follow_the_menu() { let title = |key: &str| photocraft_engine::prefs::SECTIONS.iter().find(|(k, _)| *k == key).map(|(_, t)| *t); assert_eq!(title("plugIns"), Some("Plugins")); - assert_eq!(title("rawDefaults"), Some("Camera Raw Defaults")); + assert_eq!(title("rawDefaults"), Some("RAW Defaults")); } diff --git a/crates/ui-egui/src/smart_filter_rows_tests.rs b/crates/ui-egui/src/smart_filter_rows_tests.rs index 722fc58f60..1d5daf2950 100644 --- a/crates/ui-egui/src/smart_filter_rows_tests.rs +++ b/crates/ui-egui/src/smart_filter_rows_tests.rs @@ -137,7 +137,7 @@ fn a_camera_raw_filter_copies_and_its_copy_opens_on_the_target() { h.state_mut().run("layer.select", json!({"layer": a})).unwrap(); h.state_mut().run("filter.cameraRaw", json!({"exposure": 1.0, "contrast": 20})).unwrap(); h.run_steps(4); - let (from, to) = (at(&h, "Camera Raw Filter"), at(&h, "Smart B")); + let (from, to) = (at(&h, "RAW Develop Filter"), at(&h, "Smart B")); drag(&mut h, from, to, Modifiers::ALT); let raw = |h: &egui_kittest::Harness<'static, PhotocraftApp>, id: u64| match &h.state().session.active().unwrap().doc.layer(LayerId(id)).unwrap().content { LayerContent::Smart(sm) => sm.smart_filters.iter().find(|f| f.command == "filter.cameraRaw").map(|f| f.params.clone()), @@ -147,7 +147,7 @@ fn a_camera_raw_filter_copies_and_its_copy_opens_on_the_target() { assert_eq!(raw(&h, b).unwrap()["exposure"], 1.0); // B is above A in the panel, so its copy is the upper of the two Camera Raw rows. let copy = h - .query_all_by_label("Camera Raw Filter") + .query_all_by_label("RAW Develop Filter") .filter(|n| n.accesskit_node().role() == Role::Button) .map(|n| n.rect().center()) .min_by(|p, q| p.y.total_cmp(&q.y)) @@ -160,7 +160,7 @@ fn a_camera_raw_filter_copies_and_its_copy_opens_on_the_target() { h.run_steps(1); } h.run_steps(3); - let dialog = h.state().camera_raw.as_ref().expect("Camera Raw opened"); + let dialog = h.state().camera_raw.as_ref().expect("RAW Develop opened"); assert_eq!(dialog.layer, LayerId(b)); } diff --git a/crates/ui-egui/tests/display_names.rs b/crates/ui-egui/tests/display_names.rs new file mode 100644 index 0000000000..7202a5f91a --- /dev/null +++ b/crates/ui-egui/tests/display_names.rs @@ -0,0 +1,220 @@ +//! Guard the production display surfaces without banning compatibility identifiers or notices. +use std::path::{Path, PathBuf}; + +const BANNED: &[&str] = &[ + "Camera Raw", + "Adobe Single-line Composer", + "Adobe Every-line Composer", + "Adobe PDF Presets", + "Default Photoshop Size", + "All shortcuts reset to Photoshop defaults.", +]; +// Photoshop's own wording where it is stored data or a search alias, never a label: the .atn step +// name Save Actions writes back (the menu item and window read "RAW Develop"), and the names a +// command list is filtered by. +const ALLOWED: &[&str] = &[ + "Adobe Camera Raw Filter", + "Camera Raw Filter", + "Camera Raw Defaults", + "Save these settings as a Camera Raw .xmp file", + "Load settings from a Camera Raw .xmp file", +]; +// The only catalog rows that may say "Camera Raw": their English text names Photoshop's .xmp files. +const ALLOWED_KEYS: &[&str] = &["Save these settings as a Camera Raw .xmp file", "Load settings from a Camera Raw .xmp file"]; +const ROOTS: &[&str] = &["src", "../engine/src"]; + +fn is_word(c: char) -> bool { + c.is_alphanumeric() || c == '_' +} + +/// The bans as written, before any exemption: does `text` say one of them as a whole word? +fn mentions_banned(text: &str) -> bool { + BANNED.iter().any(|banned| { + text.match_indices(banned) + .any(|(at, _)| !text[..at].chars().next_back().is_some_and(is_word) && !text[at + banned.len()..].chars().next().is_some_and(is_word)) + }) +} + +fn banned_display(text: &str) -> bool { + !ALLOWED.contains(&text) && mentions_banned(text) +} + +// Read ordinary and raw Rust string literals, ignoring comments. No compiler dependency is +// needed, so this guard can also run by itself when a full application build is unavailable. +#[allow(clippy::cognitive_complexity)] // This small test-only lexer keeps raw-string/comment state together. +fn literals(source: &str) -> Vec { + let chars: Vec = source.chars().collect(); + let mut out = Vec::new(); + let mut at = 0; + let mut test_module = false; + let mut test_depth = 0_usize; + while at < chars.len() { + if chars.get(at..at + 12) == Some(&['#', '[', 'c', 'f', 'g', '(', 't', 'e', 's', 't', ')', ']']) { + at += 12; + let rest: String = chars[at..].iter().collect(); + if rest.trim_start().starts_with("mod ") { + test_module = true; + } + } else if chars.get(at..at + 2) == Some(&['/', '/']) { + while at < chars.len() && chars[at] != '\n' { + at += 1; + } + } else if chars.get(at..at + 2) == Some(&['/', '*']) { + at += 2; + let mut depth = 1; + while at < chars.len() && depth > 0 { + if chars.get(at..at + 2) == Some(&['/', '*']) { + depth += 1; + at += 2; + } else if chars.get(at..at + 2) == Some(&['*', '/']) { + depth -= 1; + at += 2; + } else { + at += 1; + } + } + } else if chars[at] == 'r' && matches!(chars.get(at + 1), Some('"' | '#')) { + let start = at; + at += 1; + while chars.get(at) == Some(&'#') { + at += 1; + } + let hashes = at - start - 1; + if chars.get(at) != Some(&'"') { + continue; + } + at += 1; + let begin = at; + while at < chars.len() { + if chars[at] == '"' && (1..=hashes).all(|n| chars.get(at + n) == Some(&'#')) { + break; + } + at += 1; + } + if !test_module { + out.push(chars[begin..at].iter().collect()); + } + at += 1 + hashes; + } else if chars[at] == '"' { + at += 1; + let mut text = String::new(); + while at < chars.len() { + let c = chars[at]; + at += 1; + if c == '"' { + break; + } + if c == '\\' && at < chars.len() { + text.push(chars[at]); + at += 1; + } else { + text.push(c); + } + } + if !test_module { + out.push(text); + } + } else if chars[at] == '\'' && chars.get(at + 2) == Some(&'\'') { + at += 3; // A character literal such as '"', not the start of a string. + } else { + if test_module { + match chars[at] { + '{' => test_depth += 1, + '}' => { + test_depth = test_depth.saturating_sub(1); + if test_depth == 0 { + test_module = false; + } + } + ';' if test_depth == 0 => test_module = false, + _ => {} + } + } + at += 1; + } + } + out +} + +fn check_tree(path: &Path, failures: &mut Vec) { + if path.is_dir() { + for entry in std::fs::read_dir(path).expect("source directory") { + let path = entry.expect("source entry").path(); + if path.file_name().is_some_and(|name| name == "tests") { + continue; + } + check_tree(&path, failures); + } + } else if path.extension().is_some_and(|ext| ext == "rs") { + let name = path.file_name().expect("source filename").to_string_lossy(); + if name == "tests.rs" || name.ends_with("_tests.rs") { + return; + } + let source = std::fs::read_to_string(path).expect("UTF-8 Rust source"); + // Skip only inline test modules, not later production following test-only imports. + for text in literals(&source) { + if banned_display(&text) { + failures.push(format!("{}: {text:?}", path.display())); + } + } + } +} + +#[test] +fn production_display_names_stay_neutral() { + let base = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let mut failures = Vec::new(); + for root in ROOTS { + let root = base.join(root); + assert!(root.exists(), "missing display source: {}", root.display()); + check_tree(&root, &mut failures); + } + assert!(failures.is_empty(), "Banned display names:\n{}", failures.join("\n")); +} + +#[test] +fn guard_distinguishes_labels_from_identifiers_and_comments() { + for name in BANNED { + assert!(banned_display(name), "{name}"); + } + for name in ALLOWED { + assert!(!banned_display(name), "{name}"); + } + assert!(!banned_display("filter.cameraRaw")); + assert!(!banned_display("tool.guidedUpright")); + assert!(!banned_display("insert.smartArt")); + assert_eq!(literals("// \"ignored\"\n/* \"ignored\" */ \"label\""), ["label"]); + assert_eq!(literals("r#\"raw label\"#"), ["raw label"]); +} + +#[test] +fn catalogs_do_not_restore_retired_display_names() { + let dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/i18n"); + for entry in std::fs::read_dir(dir).expect("catalog directory") { + let path = entry.expect("catalog entry").path(); + if path.extension().is_none_or(|ext| ext != "tsv") { + continue; + } + let source = std::fs::read_to_string(&path).expect("UTF-8 catalog"); + for line in source.lines().filter(|line| !line.starts_with('#')) { + let columns: Vec<_> = line.split('\t').collect(); + if let [_, key, value] = columns.as_slice() { + assert!(ALLOWED_KEYS.contains(key) || !mentions_banned(key), "{}: retired key {key}", path.display()); + if !ALLOWED_KEYS.contains(key) { + assert!(!mentions_banned(value), "{}: retired display text {value}", path.display()); + } + assert_ne!(*key, "Open in camera raw", "{}: dormant key", path.display()); + } + } + } +} + +#[test] +fn guard_scans_production_after_test_only_items() { + let source = r###"#[cfg(test)] mod tests { let _ = "ignored"; } + #[cfg(test)] use fixtures::Helper; + fn production() { let _ = r#"live label"#; } + "###; + assert_eq!(literals(source), ["live label"]); + assert_eq!(literals("#[cfg(test)] mod tests; fn live() { let _ = \"live label\"; }"), ["live label"]); +} diff --git a/docs/feature-names.md b/docs/feature-names.md new file mode 100644 index 0000000000..e44515c0f8 --- /dev/null +++ b/docs/feature-names.md @@ -0,0 +1,17 @@ +# Feature naming + +PhotoCraft names its own raw-processing workspace **RAW Develop**, the adjustment **RAW Develop Filter**, and its raw preferences **RAW Defaults**. All 34 shipped non-English catalogs use the new keys and localized labels. + +## Compatibility boundary + +The `filter.cameraRaw` command, raw preference IDs, Rust type names and serialized settings remain stable. Existing documents retain their own saved filter names. New filters get the neutral display name. + +Adobe Camera Raw PSD/action descriptor class names, XMP namespaces and the settings-file compatibility descriptions are unchanged. Import/export mapping code and attribution are unchanged. + +A Photoshop action's step name is stored in the action file, so a saved Camera Raw step keeps Photoshop's "Camera Raw Filter" wording and a loaded action round-trips unchanged. Only PhotoCraft's own step labels, menus and windows say RAW Develop Filter. + +## Validation before readiness + +Review menu and dialog layout in the supported interfaces, run the engine/UI tests and the existing PSD/action/XMP round-trip tests, and complete the normal platform gates. This is a feature naming change, not a legal determination. + +The catalog cleanup removes 136 dormant rows for branded composer labels, PDF presets, old Photoshop defaults and the unused raw-opening label. No active non-localization call sites use those keys. Current PhotoCraft defaults and required compatibility descriptions remain intact. Regression guards cover production Rust display literals and catalog keys; explicit exceptions document interchange descriptions and identifiers.