controlcenter: corrected nesting of bg when transparency off
This commit is contained in:
parent
dedff0bfe5
commit
50e29f8be3
3 changed files with 10 additions and 2 deletions
|
|
@ -16,7 +16,9 @@ StyledRect {
|
||||||
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
||||||
|
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
color: Colours.transparency.enabled
|
||||||
|
? Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||||
|
: Colours.palette.m3surfaceContainerHigh
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ ColumnLayout {
|
||||||
property string description: ""
|
property string description: ""
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
property bool showBackground: false
|
property bool showBackground: false
|
||||||
|
property bool nested: false
|
||||||
|
|
||||||
signal toggleRequested
|
signal toggleRequested
|
||||||
|
|
||||||
|
|
@ -87,7 +88,9 @@ ColumnLayout {
|
||||||
id: backgroundRect
|
id: backgroundRect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
color: Colours.transparency.enabled
|
||||||
|
? Colours.layer(Colours.palette.m3surfaceContainer, root.nested ? 3 : 2)
|
||||||
|
: (root.nested ? Colours.palette.m3surfaceContainerHigh : Colours.palette.m3surfaceContainer)
|
||||||
opacity: root.showBackground && root.expanded ? 1.0 : 0.0
|
opacity: root.showBackground && root.expanded ? 1.0 : 0.0
|
||||||
visible: root.showBackground
|
visible: root.showBackground
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -524,6 +524,7 @@ RowLayout {
|
||||||
title: qsTr("Material font family")
|
title: qsTr("Material font family")
|
||||||
expanded: true
|
expanded: true
|
||||||
showBackground: true
|
showBackground: true
|
||||||
|
nested: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: materialFontLoader
|
id: materialFontLoader
|
||||||
|
|
@ -606,6 +607,7 @@ RowLayout {
|
||||||
title: qsTr("Monospace font family")
|
title: qsTr("Monospace font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
showBackground: true
|
showBackground: true
|
||||||
|
nested: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -686,6 +688,7 @@ RowLayout {
|
||||||
title: qsTr("Sans-serif font family")
|
title: qsTr("Sans-serif font family")
|
||||||
expanded: false
|
expanded: false
|
||||||
showBackground: true
|
showBackground: true
|
||||||
|
nested: true
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue