controlcenter: added slight background to expanded collapsiblesections on appearance
This commit is contained in:
parent
8262d34bc0
commit
ba094963bc
2 changed files with 28 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ ColumnLayout {
|
||||||
required property string title
|
required property string title
|
||||||
property string description: ""
|
property string description: ""
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
|
property bool showBackground: false
|
||||||
|
|
||||||
signal toggleRequested
|
signal toggleRequested
|
||||||
|
|
||||||
|
|
@ -82,6 +83,21 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
id: backgroundRect
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: Appearance.rounding.normal
|
||||||
|
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
opacity: root.showBackground && root.expanded ? 1.0 : 0.0
|
||||||
|
visible: root.showBackground
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
Anim {
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,7 @@ RowLayout {
|
||||||
id: themeModeSection
|
id: themeModeSection
|
||||||
title: qsTr("Theme mode")
|
title: qsTr("Theme mode")
|
||||||
description: qsTr("Light or dark theme")
|
description: qsTr("Light or dark theme")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SwitchRow {
|
SwitchRow {
|
||||||
label: qsTr("Dark mode")
|
label: qsTr("Dark mode")
|
||||||
|
|
@ -193,6 +194,7 @@ RowLayout {
|
||||||
id: colorVariantSection
|
id: colorVariantSection
|
||||||
title: qsTr("Color variant")
|
title: qsTr("Color variant")
|
||||||
description: qsTr("Material theme variant")
|
description: qsTr("Material theme variant")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -274,6 +276,7 @@ RowLayout {
|
||||||
id: colorSchemeSection
|
id: colorSchemeSection
|
||||||
title: qsTr("Color scheme")
|
title: qsTr("Color scheme")
|
||||||
description: qsTr("Available color schemes")
|
description: qsTr("Available color schemes")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -409,6 +412,7 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: animationsSection
|
id: animationsSection
|
||||||
title: qsTr("Animations")
|
title: qsTr("Animations")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SectionContainer {
|
SectionContainer {
|
||||||
contentSpacing: Appearance.spacing.normal
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
@ -513,11 +517,13 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: fontsSection
|
id: fontsSection
|
||||||
title: qsTr("Fonts")
|
title: qsTr("Fonts")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: materialFontSection
|
id: materialFontSection
|
||||||
title: qsTr("Material font family")
|
title: qsTr("Material font family")
|
||||||
expanded: true
|
expanded: true
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -593,6 +599,7 @@ RowLayout {
|
||||||
id: monoFontSection
|
id: monoFontSection
|
||||||
title: qsTr("Monospace font family")
|
title: qsTr("Monospace font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -668,6 +675,7 @@ RowLayout {
|
||||||
id: sansFontSection
|
id: sansFontSection
|
||||||
title: qsTr("Sans-serif font family")
|
title: qsTr("Sans-serif font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -842,6 +850,7 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: scalesSection
|
id: scalesSection
|
||||||
title: qsTr("Scales")
|
title: qsTr("Scales")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SectionContainer {
|
SectionContainer {
|
||||||
contentSpacing: Appearance.spacing.normal
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
@ -1144,6 +1153,7 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: transparencySection
|
id: transparencySection
|
||||||
title: qsTr("Transparency")
|
title: qsTr("Transparency")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SwitchRow {
|
SwitchRow {
|
||||||
label: qsTr("Transparency enabled")
|
label: qsTr("Transparency enabled")
|
||||||
|
|
@ -1356,6 +1366,7 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: borderSection
|
id: borderSection
|
||||||
title: qsTr("Border")
|
title: qsTr("Border")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SectionContainer {
|
SectionContainer {
|
||||||
contentSpacing: Appearance.spacing.normal
|
contentSpacing: Appearance.spacing.normal
|
||||||
|
|
@ -1547,6 +1558,7 @@ RowLayout {
|
||||||
CollapsibleSection {
|
CollapsibleSection {
|
||||||
id: backgroundSection
|
id: backgroundSection
|
||||||
title: qsTr("Background")
|
title: qsTr("Background")
|
||||||
|
showBackground: true
|
||||||
|
|
||||||
SwitchRow {
|
SwitchRow {
|
||||||
label: qsTr("Desktop clock")
|
label: qsTr("Desktop clock")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue