Toolbar customisation: a command's menu (right-click a toolbar button, a panel drop-down row or an S box row) pins it to the toolbar, removes it or pins it to the S box's favourites; drag buttons to reorder within and between panels (drop line); Reset Toolbar; per workspace and tab, kept with the preferences, exported and imported with the keyboard shortcuts. Workspace switcher spans the toolbar's height and opens the workspace menu (Design; the others coming later)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
b5e74030c0
commit
4812ec6c0b
7 files changed
+370
-21
No files matched your search
@@ -152,6 +152,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
}
|
||||
let mut picked: Option<&'static str> = None;
|
||||
let mut pin: Option<&'static str> = None;
|
||||
let mut menu: Option<(Pos2, &'static str)> = None;
|
||||
let h = 380.0;
|
||||
let pos = pos2(
|
||||
at.x.clamp(screen.left() + 4.0, (screen.right() - W - 4.0).max(screen.left())),
|
||||
@@ -237,6 +238,9 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
} else if resp.clicked() && enabled {
|
||||
picked = Some(id);
|
||||
}
|
||||
if resp.secondary_clicked() {
|
||||
menu = Some((resp.interact_pointer_pos().unwrap_or(r.left_bottom()), id));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -244,6 +248,11 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
if let Some(id) = pin {
|
||||
app.sbox.toggle_pin(id);
|
||||
}
|
||||
// A row's menu: pin to the toolbar or the shortcuts.
|
||||
if let Some((at, id)) = menu {
|
||||
crate::context_menu::open_for(app, at, crate::context_menu::Target::ToolbarCommand { id: id.to_string() });
|
||||
return;
|
||||
}
|
||||
if enter
|
||||
&& picked.is_none()
|
||||
&& let Some((id, ..)) = list.get(app.sbox.index)
|
||||
|
||||
Reference in new issue
Block a user