controlcenter: added collapse/expand all to apperaance and taskbar

This commit is contained in:
ATMDA 2025-11-16 19:36:05 -05:00
parent 07637da8f6
commit 8981ab8806
2 changed files with 60 additions and 10 deletions

View file

@ -141,6 +141,17 @@ RowLayout {
anchors.right: parent.right
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 {
spacing: Appearance.spacing.smaller
@ -153,6 +164,24 @@ RowLayout {
Item {
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 {

View file

@ -175,19 +175,40 @@ RowLayout {
spacing: Appearance.spacing.small
readonly property bool allSectionsExpanded:
clockSection.expanded &&
barBehaviorSection.expanded &&
statusIconsSection.expanded &&
traySettingsSection.expanded &&
workspacesSection.expanded
RowLayout {
spacing: Appearance.spacing.smaller
spacing: Appearance.spacing.smaller
StyledText {
text: qsTr("Settings")
font.pointSize: Appearance.font.size.large
font.weight: 500
}
StyledText {
text: qsTr("Settings")
font.pointSize: Appearance.font.size.large
font.weight: 500
}
Item {
Layout.fillWidth: true
}
}
Item {
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 {
id: clockSection