git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commitdfb674f7e63eb3cab722813784f8607b98ef5c7d
parentd253d0cdee
authorLucas Galante <[email protected]>
date2026-09-01 10:35
feat: the Add Tab page carries a Back row

'‹ Back' under a separator at the page's foot swaps the main menu
page back in — the two pages are one menu, and Back is how the second
one says so.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/plate_corner.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/plate_corner.rs b/src/plate_corner.rs
index fccc53e..9767c77 100644
--- a/src/plate_corner.rs
+++ b/src/plate_corner.rs
@@ -58,6 +58,8 @@ pub enum PlateMenuAction {
     /// Swap the menu for the Add Tab page — the list of panes that can be
     /// pulled in ([`State::open_plate_add_tab_menu`]).
     AddTabMenu,
+    /// The Add Tab page's Back row: swap the main menu page back in.
+    BackToMain,
     /// Move this pane out of its shared dock into the first empty one.
     SplitTab,
     /// Remove a closable pane (the second network editor) from the docks.
@@ -252,6 +254,10 @@ impl State {
             options.push(plate_title(other).to_string());
             actions.push(PlateMenuAction::AddTab(other));
         }
+        options.push("-".to_string());
+        actions.push(PlateMenuAction::Separator);
+        options.push("‹ Back".to_string());
+        actions.push(PlateMenuAction::BackToMain);
         let target = self.slots.get_dyn(idx).base().id();
         cce_ui::widget::context_menu::show(cx - CORNER_R, cy + CORNER_R, options, 1, target);
         self.plate_menu_slot = Some(idx);
@@ -307,6 +313,7 @@ impl State {
                 }
             }
             PlateMenuAction::AddTabMenu => self.open_plate_add_tab_menu(idx),
+            PlateMenuAction::BackToMain => self.open_plate_menu(idx),
             PlateMenuAction::SplitTab => self.split_dock_tab(idx),
             PlateMenuAction::CloseTab => self.close_dock_tab(idx),
             PlateMenuAction::Separator => {}