mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 04:07:57 -06:00
Add a settings menu option to collapse all categories
CURA-6959
This commit is contained in:
parent
5c83ba0129
commit
d780efd76c
3 changed files with 18 additions and 2 deletions
|
@ -15,6 +15,7 @@ Menu
|
|||
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
|
||||
|
||||
signal showAllSettings()
|
||||
signal collapseAllCategories()
|
||||
|
||||
Instantiator
|
||||
{
|
||||
|
@ -49,6 +50,15 @@ Menu
|
|||
}
|
||||
MenuSeparator {}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Collapse All Categories")
|
||||
onTriggered:
|
||||
{
|
||||
collapseAllCategories();
|
||||
}
|
||||
}
|
||||
MenuSeparator {}
|
||||
MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Manage Setting Visibility...")
|
||||
iconName: "configure"
|
||||
|
|
|
@ -107,7 +107,7 @@ Button
|
|||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.height: width
|
||||
color: UM.Theme.getColor("setting_control_button")
|
||||
source: base.checked ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||
source: definition.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ Button
|
|||
onClicked:
|
||||
{
|
||||
settingDefinitionsModel.expandRecursive(definition.key)
|
||||
base.checked = true
|
||||
base.checked = true //todo should not be necessary and also breaks binding, right?
|
||||
base.showAllHiddenInheritedSettings(definition.key)
|
||||
}
|
||||
|
||||
|
|
|
@ -192,6 +192,12 @@ Item
|
|||
definitionsModel.setAllVisible(true)
|
||||
filter.updateDefinitionModel()
|
||||
}
|
||||
|
||||
onCollapseAllCategories:
|
||||
{
|
||||
definitionsModel.collapseAllCategories()
|
||||
filter.updateDefinitionModel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue