mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Scroll setting with active focus into view
This commit is contained in:
parent
b324e90ba5
commit
edee53b0b1
8 changed files with 73 additions and 6 deletions
|
|
@ -14,10 +14,11 @@ Button {
|
|||
|
||||
style: UM.Theme.styles.sidebar_category;
|
||||
|
||||
signal showTooltip(string text);
|
||||
signal hideTooltip();
|
||||
signal showTooltip(string text)
|
||||
signal hideTooltip()
|
||||
signal contextMenuRequested()
|
||||
signal showAllHiddenInheritedSettings(string category_id)
|
||||
signal focusReceived()
|
||||
|
||||
text: definition.label
|
||||
iconSource: UM.Theme.getIcon(definition.icon)
|
||||
|
|
@ -25,7 +26,24 @@ Button {
|
|||
checkable: true
|
||||
checked: definition.expanded
|
||||
|
||||
onClicked: { forceActiveFocus(); definition.expanded ? settingDefinitionsModel.collapse(definition.key) : settingDefinitionsModel.expandAll(definition.key) }
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus();
|
||||
if(definition.expanded)
|
||||
{
|
||||
settingDefinitionsModel.collapse(definition.key);
|
||||
} else {
|
||||
settingDefinitionsModel.expandAll(definition.key);
|
||||
}
|
||||
}
|
||||
onActiveFocusChanged:
|
||||
{
|
||||
if(activeFocus)
|
||||
{
|
||||
base.focusReceived();
|
||||
}
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: settingsButton
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue