forked from 1b-agent/opencadstudio-upstream
feat: redesign Manage tab to match reference layout
- Add Customization group: User Interface (CUI), Tool Palettes (large), Import, Export, Edit Aliases dropdown (small) - Add Cleanup group: Find Non-Purgeable Items (large), Purge, Overkill, Audit (small) - Add 8 new SVG icons for all new commands Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
ef988c20a3
commit
fce611d782
18 files changed
+170
-6
No files matched your search
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/audit.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "AUDIT", label: "Audit", icon: ICON, event: ModuleEvent::Command("AUDIT".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/cui_export.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "CUIEXPORT", label: "Export", icon: ICON, event: ModuleEvent::Command("CUIEXPORT".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/cui_import.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "CUIIMPORT", label: "Import", icon: ICON, event: ModuleEvent::Command("CUIIMPORT".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
#[allow(dead_code)]
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/edit_aliases.svg"));
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ALIASEDIT", label: "Edit Aliases", icon: ICON, event: ModuleEvent::Command("ALIASEDIT".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/find_nonpurgeable.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "FINDNONPURGEABLE", label: "Find Non-\nPurgeable Items", icon: ICON, event: ModuleEvent::Command("FINDNONPURGEABLE".to_string()) }
|
||||
}
|
||||
@@ -1,8 +1,16 @@
|
||||
// Manage module — application settings and customization tools.
|
||||
// Manage module — customization and drawing cleanup tools.
|
||||
|
||||
mod audit;
|
||||
mod cui_export;
|
||||
mod cui_import;
|
||||
mod edit_aliases;
|
||||
mod find_nonpurgeable;
|
||||
mod options;
|
||||
mod overkill;
|
||||
mod purge;
|
||||
mod user_interface;
|
||||
|
||||
use crate::modules::{CadModule, RibbonGroup};
|
||||
use crate::modules::{CadModule, IconKind, RibbonGroup, RibbonItem};
|
||||
|
||||
pub struct ManageModule;
|
||||
|
||||
@@ -15,9 +23,41 @@ impl CadModule for ManageModule {
|
||||
}
|
||||
|
||||
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
|
||||
vec![RibbonGroup {
|
||||
title: "Settings",
|
||||
tools: vec![options::tool().into()],
|
||||
}]
|
||||
vec![
|
||||
// ── Customization ─────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Customization",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(user_interface::tool()),
|
||||
RibbonItem::LargeTool(crate::modules::ToolDef {
|
||||
id: "TOOLPALETTES",
|
||||
label: "Tool\nPalettes",
|
||||
icon: IconKind::Svg(include_bytes!("../../../assets/icons/tool_palettes.svg")),
|
||||
event: crate::modules::ModuleEvent::Command("TOOLPALETTES".to_string()),
|
||||
}),
|
||||
RibbonItem::Tool(cui_import::tool()),
|
||||
RibbonItem::Tool(cui_export::tool()),
|
||||
RibbonItem::Dropdown {
|
||||
id: "ALIASEDIT_DROPDOWN",
|
||||
icon: IconKind::Svg(include_bytes!("../../../assets/icons/edit_aliases.svg")),
|
||||
items: vec![
|
||||
("ALIASEDIT", "Edit Aliases", IconKind::Svg(include_bytes!("../../../assets/icons/edit_aliases.svg"))),
|
||||
("CUILOAD", "Load Partial CUI", IconKind::Svg(include_bytes!("../../../assets/icons/cui_import.svg"))),
|
||||
],
|
||||
default: "ALIASEDIT",
|
||||
},
|
||||
],
|
||||
},
|
||||
// ── Cleanup ───────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Cleanup",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(find_nonpurgeable::tool()),
|
||||
RibbonItem::Tool(purge::tool()),
|
||||
RibbonItem::Tool(overkill::tool()),
|
||||
RibbonItem::Tool(audit::tool()),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "OPTIONS",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/overkill.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "OVERKILL", label: "Overkill", icon: ICON, event: ModuleEvent::Command("OVERKILL".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/purge.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "PURGE", label: "Purge", icon: ICON, event: ModuleEvent::Command("PURGE".to_string()) }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/user_interface.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "CUI", label: "User\nInterface", icon: ICON, event: ModuleEvent::Command("CUI".to_string()) }
|
||||
}
|
||||
Reference in new issue
Block a user