diff --git a/crates/midra-layout/src/gui.rs b/crates/midra-layout/src/gui.rs index 0335290..7287ce2 100644 --- a/crates/midra-layout/src/gui.rs +++ b/crates/midra-layout/src/gui.rs @@ -971,17 +971,16 @@ impl Editor { 12.0, MUTED, ); - for (x, width, title) in [(24.0, 184.0, "VIEW"), (220.0, 206.0, "HISTORY")] { - ink.card(x, 64.0, width, 40.0, FIELD, LINE); - ink.text(x + 12.0, 78.0, title, 10.0, MUTED); - } + // A single compact strip: view tools, then history tools. + ink.card(24.0, 65.0, 150.0, 36.0, FIELD, LINE); + ink.line([99.0, 73.0], [99.0, 93.0], LINE); for (x, text, icon) in [ - (120.0, "Fit screen", ToolbarIcon::Screen), - (162.0, "Fit selected", ToolbarIcon::Selection), - (340.0, "Undo", ToolbarIcon::Undo), - (382.0, "Redo", ToolbarIcon::Redo), + (28.0, "Fit screen", ToolbarIcon::Screen), + (62.0, "Fit selected", ToolbarIcon::Selection), + (104.0, "Undo", ToolbarIcon::Undo), + (138.0, "Redo", ToolbarIcon::Redo), ] { - let rect = Rect::from_min_size(ink.point(x, 67.0), Vec2::splat(34.0)); + let rect = Rect::from_min_size(ink.point(x, 67.0), Vec2::splat(32.0)); if toolbar_icon(ui, rect, text, icon).clicked() { match text { "Fit screen" => { @@ -1008,8 +1007,8 @@ impl Editor { } } } - ink.button(438.0, 67.0, 154.0, "Paste layer(s) values", true); - if click(ui, &ink, [438.0, 67.0, 154.0, 34.0], "toolbar-paste") { + ink.button(190.0, 66.0, 154.0, "Paste layer(s) values", true); + if click(ui, &ink, [190.0, 66.0, 154.0, 34.0], "toolbar-paste") { self.open_paste(String::new()); } ink.button(438.0, 20.0, 154.0, "Reference image…", false); diff --git a/docs/midra-layout.md b/docs/midra-layout.md index faf9537..72060e2 100644 --- a/docs/midra-layout.md +++ b/docs/midra-layout.md @@ -116,12 +116,12 @@ clipboard testing against a running draw.io instance remains to be done. corner's offsets. Invalid values leave the document unchanged. - **Escape** cancels a drag or restores uncommitted numeric fields. In the paste dialog it closes the preview without applying it. Group drags cancel atomically. -- The **History** toolbar icons (**Undo/Redo**) or Ctrl/Cmd-Z, Ctrl/Cmd-Shift-Z (also Ctrl/Cmd-Y) reverse +- The history toolbar icons (**Undo/Redo**) or Ctrl/Cmd-Z, Ctrl/Cmd-Shift-Z (also Ctrl/Cmd-Y) reverse edits. Each drag, alignment, applied paste or numeric edit is one step; retain 100 undo records. View changes and selection are not document edits. - Scroll over the viewport to zoom around the pointer. Space-drag or middle-drag - pans. In the **View** toolbar group, **Fit screen** resets the view and - **Fit selected** frames the entire selection. Hover an icon for its label. + pans. In the compact toolbar’s view group, **Fit screen** resets the view and + **Fit selected** frames the entire selection. A divider separates view tools from Undo/Redo. Hover an icon for its label. Camera changes do not modify coordinates. Off-screen layers retain their exact coordinates, display a warning and remain selectable through the layer list. - **Copy position values** (or **Copy selected positions** for multiple layers)