controlcenter: added collapse/expand all to apperaance and taskbar
This commit is contained in:
parent
07637da8f6
commit
8981ab8806
2 changed files with 60 additions and 10 deletions
|
|
@ -141,6 +141,17 @@ RowLayout {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
|
readonly property bool allSectionsExpanded:
|
||||||
|
themeModeSection.expanded &&
|
||||||
|
colorVariantSection.expanded &&
|
||||||
|
colorSchemeSection.expanded &&
|
||||||
|
animationsSection.expanded &&
|
||||||
|
fontsSection.expanded &&
|
||||||
|
scalesSection.expanded &&
|
||||||
|
transparencySection.expanded &&
|
||||||
|
borderSection.expanded &&
|
||||||
|
backgroundSection.expanded
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Appearance.spacing.smaller
|
spacing: Appearance.spacing.smaller
|
||||||
|
|
||||||
|
|
@ -153,6 +164,24 @@ RowLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconButton {
|
||||||
|
icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
|
||||||
|
type: IconButton.Text
|
||||||
|
label.animate: true
|
||||||
|
onClicked: {
|
||||||
|
const shouldExpand = !sidebarLayout.allSectionsExpanded;
|
||||||
|
themeModeSection.expanded = shouldExpand;
|
||||||
|
colorVariantSection.expanded = shouldExpand;
|
||||||
|
colorSchemeSection.expanded = shouldExpand;
|
||||||
|
animationsSection.expanded = shouldExpand;
|
||||||
|
fontsSection.expanded = shouldExpand;
|
||||||
|
scalesSection.expanded = shouldExpand;
|
||||||
|
transparencySection.expanded = shouldExpand;
|
||||||
|
borderSection.expanded = shouldExpand;
|
||||||
|
backgroundSection.expanded = shouldExpand;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,13 @@ RowLayout {
|
||||||
|
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
|
readonly property bool allSectionsExpanded:
|
||||||
|
clockSection.expanded &&
|
||||||
|
barBehaviorSection.expanded &&
|
||||||
|
statusIconsSection.expanded &&
|
||||||
|
traySettingsSection.expanded &&
|
||||||
|
workspacesSection.expanded
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Appearance.spacing.smaller
|
spacing: Appearance.spacing.smaller
|
||||||
|
|
||||||
|
|
@ -187,6 +194,20 @@ RowLayout {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconButton {
|
||||||
|
icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
|
||||||
|
type: IconButton.Text
|
||||||
|
label.animate: true
|
||||||
|
onClicked: {
|
||||||
|
const shouldExpand = !sidebarLayout.allSectionsExpanded;
|
||||||
|
clockSection.expanded = shouldExpand;
|
||||||
|
barBehaviorSection.expanded = shouldExpand;
|
||||||
|
statusIconsSection.expanded = shouldExpand;
|
||||||
|
traySettingsSection.expanded = shouldExpand;
|
||||||
|
workspacesSection.expanded = shouldExpand;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue