forked from 1b-agent/opencadstudio-upstream
Add Graphic Attributes palette toggle and persistence
This commit is contained in:
1 parent
3b74c7e7ea
commit
3e45331de1
14 files changed
+220
-71
No files matched your search
@@ -54,6 +54,8 @@ pub struct Ribbon {
|
||||
pub show_ucs_icon: bool,
|
||||
/// Properties panel (PROPERTIES) visibility — drives the Properties button highlight.
|
||||
pub show_properties: bool,
|
||||
/// Graphic Attributes panel visibility — drives its ribbon button highlight.
|
||||
pub show_graphic_attributes: bool,
|
||||
/// File tabs (FILETAB) visibility — drives the File Tabs button highlight.
|
||||
pub show_file_tabs: bool,
|
||||
/// Layout tabs (LAYOUTTAB) visibility — drives the Layout Tabs button highlight.
|
||||
@@ -162,6 +164,7 @@ impl Ribbon {
|
||||
show_viewcube: true,
|
||||
show_ucs_icon: true,
|
||||
show_properties: true,
|
||||
show_graphic_attributes: false,
|
||||
show_file_tabs: true,
|
||||
show_layout_tabs: true,
|
||||
open_dropdown: None,
|
||||
@@ -315,6 +318,9 @@ impl Ribbon {
|
||||
pub fn set_properties(&mut self, on: bool) {
|
||||
self.show_properties = on;
|
||||
}
|
||||
pub fn set_graphic_attributes(&mut self, on: bool) {
|
||||
self.show_graphic_attributes = on;
|
||||
}
|
||||
pub fn set_file_tabs(&mut self, on: bool) {
|
||||
self.show_file_tabs = on;
|
||||
}
|
||||
@@ -332,6 +338,7 @@ impl Ribbon {
|
||||
show_viewcube: self.show_viewcube,
|
||||
show_ucs_icon: self.show_ucs_icon,
|
||||
show_properties: self.show_properties,
|
||||
show_graphic_attributes: self.show_graphic_attributes,
|
||||
show_block_palette,
|
||||
show_file_tabs: self.show_file_tabs,
|
||||
show_layout_tabs: self.show_layout_tabs,
|
||||
|
||||
@@ -37,6 +37,7 @@ pub(super) struct ToggleState {
|
||||
pub show_viewcube: bool,
|
||||
pub show_ucs_icon: bool,
|
||||
pub show_properties: bool,
|
||||
pub show_graphic_attributes: bool,
|
||||
pub show_block_palette: bool,
|
||||
pub show_file_tabs: bool,
|
||||
pub show_layout_tabs: bool,
|
||||
@@ -374,6 +375,7 @@ pub(super) fn is_active_tool(
|
||||
"NAVVCUBE" => state.show_viewcube,
|
||||
"UCSICON" => state.show_ucs_icon,
|
||||
"PROPERTIES" => state.show_properties,
|
||||
"GRAPHICATTRIBUTES" => state.show_graphic_attributes,
|
||||
"BLOCKPALETTE" => state.show_block_palette,
|
||||
"FILETAB" => state.show_file_tabs,
|
||||
"LAYOUTTAB" => state.show_layout_tabs,
|
||||
|
||||
Reference in new issue
Block a user