Increase chechbox indicator opacity when disabled

This commit is contained in:
miruka 2019-12-13 06:21:30 -04:00
parent 37023638c0
commit 2ca79a212f

View File

@ -7,7 +7,6 @@ CheckBox {
id: box id: box
spacing: theme.spacing spacing: theme.spacing
padding: 0 padding: 0
opacity: enabled ? 1 : theme.disabledElementsOpacity
property alias mainText: mainText property alias mainText: mainText
@ -18,6 +17,7 @@ CheckBox {
indicator: Rectangle { indicator: Rectangle {
opacity: box.enabled ? 1 : theme.disabledElementsOpacity + 0.2
implicitWidth: theme.controls.checkBox.boxSize implicitWidth: theme.controls.checkBox.boxSize
implicitHeight: implicitWidth implicitHeight: implicitWidth
x: box.leftPadding x: box.leftPadding
@ -55,6 +55,8 @@ CheckBox {
} }
contentItem: HColumnLayout { contentItem: HColumnLayout {
opacity: box.enabled ? 1 : theme.disabledElementsOpacity
HLabel { HLabel {
id: mainText id: mainText
text: box.text text: box.text