diff options
Diffstat (limited to 'src/imports/controls/Switch.qml')
-rw-r--r-- | src/imports/controls/Switch.qml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml index ccfdaa3c..518c07ad 100644 --- a/src/imports/controls/Switch.qml +++ b/src/imports/controls/Switch.qml @@ -67,7 +67,6 @@ AbstractSwitch { radius: 10 border.width: control.activeFocus ? 2 : 1 border.color: control.activeFocus ? control.Theme.focusColor : control.Theme.frameColor - opacity: enabled ? 1.0 : control.Theme.disabledOpacity color: control.Theme.backgroundColor Rectangle { @@ -75,9 +74,10 @@ AbstractSwitch { height: 12 radius: 6 - color: Qt.tint(Qt.tint(control.checked ? control.Theme.accentColor : control.Theme.baseColor, - control.checked && control.activeFocus ? control.Theme.focusColor : "transparent"), - control.pressed ? control.Theme.pressColor : "transparent") + color: Qt.tint(control.checked && !control.enabled ? control.Theme.disabledColor : + control.checked && control.activeFocus ? control.Theme.focusColor : + control.checked ? control.Theme.accentColor : control.Theme.baseColor, + control.pressed ? control.Theme.pressColor : "transparent") border.width: control.checked || control.pressed ? 0 : 1 border.color: control.Theme.frameColor @@ -101,10 +101,9 @@ AbstractSwitch { height: parent.height - control.topPadding - control.bottomPadding text: control.text - color: control.Theme.textColor + color: control.enabled ? control.Theme.textColor : control.Theme.disabledColor elide: Text.ElideRight visible: control.text - opacity: enabled ? 1.0 : control.Theme.disabledOpacity horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } |