forked from 1b-agent/opencadstudio-upstream
feat(ui): replace app-menu logo with a quick-access file toolbar
Remove the OCS-logo button and the dropdown menu it opened; the top strip now shows direct New / Open / Save / Save As / Print buttons ahead of the undo/redo controls. Drop the HELP and OPTIONS commands (HELP dumped text to the command line, OPTIONS aliased the drafting-settings popup). The app-menu overlay is gone, so its rendering code, MENU_ITEMS, four dead messages, and the LOGO_RED / GEAR / HELP assets are removed. The recents list it held is the only survivor — moved into OpenCADStudio.recent_files via a new app/recent.rs, backing the Start page's Recent Documents panel. Quick-access icons are redrawn in a cleaner style (file-plus, folder-open, device-floppy, file-export, printer) and tinted light so they read on the dark strip; FOLDER / DOC keep their old glyphs for the file browser. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
2bc5c2a686
commit
7bab7c7b8d
17 files changed
+154
-643
No files matched your search
@@ -240,7 +240,7 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
||||
caches.corrupt_dropped
|
||||
));
|
||||
}
|
||||
self.app_menu.push_recent(path.clone());
|
||||
self.push_recent(path.clone());
|
||||
|
||||
let current_is_empty = {
|
||||
let t = &self.tabs[self.active_tab];
|
||||
|
||||
+1
-19
@@ -243,7 +243,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
Message::RecentRemove(path) => {
|
||||
self.app_menu.remove_recent(&path);
|
||||
self.remove_recent(&path);
|
||||
Task::none()
|
||||
}
|
||||
|
||||
@@ -616,24 +616,6 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
// ── Application menu ──────────────────────────────────────────
|
||||
Message::ToggleAppMenu => {
|
||||
self.app_menu.toggle();
|
||||
Task::none()
|
||||
}
|
||||
Message::CloseAppMenu => {
|
||||
self.app_menu.close();
|
||||
Task::none()
|
||||
}
|
||||
Message::CloseAppMenuAndRun(cmd) => {
|
||||
self.app_menu.close();
|
||||
self.dispatch_command(&cmd.clone())
|
||||
}
|
||||
Message::AppMenuSearch(s) => {
|
||||
self.app_menu.search = s;
|
||||
Task::none()
|
||||
}
|
||||
|
||||
// ── Document tabs ─────────────────────────────────────────────
|
||||
Message::TabNew => {
|
||||
self.tab_counter += 1;
|
||||
|
||||
Reference in new issue
Block a user