PhotoCraft: An open-source, photo editor written by scratch in pure Rust
View › Extras (Cmd+H) hides the Move tool's transform controls (#6699) (#6705)
Gabriel Luís da Silva0ec95fa26686
diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rsindex 7f9db071c..d2543a54c 100644--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@ -5330,10 +5330,13 @@ pub(crate) fn layer_edges_rect(app: &PhotocraftApp, idx: usize) -> Option<photoc}/// The layers Move › Show Transform Controls frames: every selected layer but the Background.-/// A corner radius drag hides the box, as in Photoshop.+/// A corner radius drag hides the box, as in Photoshop. So does View › Extras (⌘H, #6699): the+/// controls are an Extra, hidden and inert until Extras comes back, while Show Transform Controls+/// keeps its setting.fn transform_controls_layers(app: &PhotocraftApp) -> Vec<&photocraft_doc::Layer> {if app.ui.tool != Tool::Move|| !app.ui.tool_options.move_show_transform+ || !app.ui.view.extras|| app.ui.transform.is_some()|| app.drag.is_some()|| app.ui.corner_radius.is_some()@@ -9456,6 +9459,48 @@ mod transform_controls_tests {assert_eq!(t.rect, [20.0, 30.0, 100.0, 70.0]);}+ #[test]+ fn hiding_extras_hides_the_move_transform_controls() {+ // #6699: as in Photoshop, View › Extras (⌘H) hides the Move tool's transform box and+ // handles; again brings them back. Show Transform Controls and the layer stay as they were.+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());+ app.session.execute("file.new", json!({"width": 200, "height": 200})).unwrap();+ app.session.execute("shape.create", json!({"kind": "rect", "rect": [20, 30, 80, 40], "fill": "#ff0000"})).unwrap();+ app.sync_views();+ app.ui.tool = Tool::Move;+ app.ui.tool_options.move_show_transform = true;+ let xf =+ ViewXform { rect: Rect::from_min_size(Pos2::ZERO, vec2(200.0, 200.0)), zoom: 1.0, center: [100.0, 100.0], flip: false, rotation: 0.0, aspect: 1.0 };+ let ctx = egui::Context::default();+ let shown = transform_controls_rect(&app, &xf).expect("the box shows with Extras on");+ let layer = app.session.active().unwrap().doc.layers.clone();+ let painted = |app: &mut PhotocraftApp| {+ let out = ctx.run_ui(egui::RawInput::default(), |ui| {+ let painter = ui.ctx().layer_painter(egui::LayerId::background());+ draw_transform_controls(app, &painter, &xf);+ });+ let egui::FullOutput { mut textures_delta, shapes, .. } = out;+ textures_delta.clear();+ shapes.len()+ };+ // The shape's outline, the box and its eight handles.+ assert!(painted(&mut app) > 8, "the box and handles are drawn");++ crate::menus::invoke(&mut app, &ctx, "view.extras", json!({})).unwrap();+ assert!(!app.ui.view.extras);+ assert!(transform_controls_rect(&app, &xf).is_none(), "no box with Extras hidden");+ assert_eq!(painted(&mut app), 0, "nothing is drawn");+ // Hidden handles don't act: a press on a corner doesn't start Free Transform.+ assert!(!begin_transform_controls_at(&mut app, &ctx, &xf, shown.right_bottom()));+ assert!(app.ui.transform.is_none());+ assert!(app.ui.tool_options.move_show_transform, "Show Transform Controls is unchanged");+ assert_eq!(app.session.active().unwrap().doc.layers, layer, "the layer is unchanged");++ crate::menus::invoke(&mut app, &ctx, "view.extras", json!({})).unwrap();+ assert!(app.ui.view.extras);+ assert_eq!(transform_controls_rect(&app, &xf), Some(shown), "⌘H again restores the box");+ }+#[test]fn move_transform_controls_follow_floating_selected_pixels() {let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());diff --git a/docs/ui-parity.md b/docs/ui-parity.mdindex 6f1e690e3..8afece06d 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-10-21 · **Change:** minor (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) · **Target:** Adobe Photoshop 2026+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-21 · **Change:** minor (View › Extras hides the Move transform controls, #6699; 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) · **Target:** Adobe Photoshop 2026How PhotoCraft's direct manipulation compares with Photoshop 2026 (27.11.0): the toolbox, thehandles and modifier keys of each gesture, nudging, snapping, numeric precision, navigation,@@ -98,6 +98,7 @@ Triangle and Curvature Pen (minus legacy Rounded Rectangle and Targeted Adjustme| With several layers selected and a selection, the Move tool moves the layers whole and the selection with them (ants follow the drag; one Move step) | done | #7538, `move_ui.rs` `carries_selection`, engine `layer.translate` `selection` || Auto-Select with hover outline, box-select layers, double-click fit | missing | TOOL-214-4 || Auto-Select bounding box and snapping follow the picked layer | partial | follow the previous layer (#2666) |+| View › Extras (⌘H) hides the Move tool's transform controls; Show Transform Controls keeps its setting | done | `canvas.rs` `transform_controls_layers`, `hiding_extras_hides_the_move_transform_controls` (#6699) || Several layers selected (⇧-click adds, box-select): Show Transform Controls frames them all, with every selected shape's outline | partial: the shared frame has no handles, since Free Transform works on one layer (`canvas.rs` `transform_controls_layers`, `several_selected_layers_share_one_frame_without_handles`; `move_auto_select_tests.rs`) | || ⌘-drag temporary Move shows the box and snaps | partial | #2681 || ⌘-right-click layer list under the pointer | done | `layer_pick_ui.rs` |@@ -287,5 +288,6 @@ Paragraph; the rest open as in-app floating windows.| 2026-10-20 | minor | Free Transform of an artboard child omits ancestor paper from the covering and isolated composites while retaining board clipping. The base canvas and whole-artboard backgrounds are preserved; synthetic regressions in `transform_tool.rs`. No parity percentage changed. || 2026-10-18 | minor | Move tool: dragging selected pixels shrinks the marching ants to the moved pixels as the drag starts, and the dropped selection is theirs, as in Photoshop (#7538) || 2026-10-18 | minor | Marching ants drawn in device pixels like Photoshop's: equally thick on every edge at 125 %/150 % display scale, thicker on HiDPI, slanted dash ends (#7489) |+| 2026-10-16 | minor | View › Extras (⌘H) hides the Move tool's transform controls and their handles stop responding; ⌘H again restores them, and Show Transform Controls keeps its setting (#6699) || 2026-10-15 | minor | ⌫/Delete with a smart filter row selected removes that filter (the Smart Filters row: all of them), as the Delete button does, instead of the smart object (#4751) || 2026-10-14 | minor | Rounded corners on live triangles, polygons and stars: Properties field and on-canvas widgets (TOOL-214-12) |