diff options
Diffstat (limited to 'src/imports/controls/SwitchIndicator.qml')
-rw-r--r-- | src/imports/controls/SwitchIndicator.qml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/imports/controls/SwitchIndicator.qml b/src/imports/controls/SwitchIndicator.qml index 261d9999..362ebfef 100644 --- a/src/imports/controls/SwitchIndicator.qml +++ b/src/imports/controls/SwitchIndicator.qml @@ -34,7 +34,9 @@ ** ****************************************************************************/ -import QtQuick 2.6 +import QtQuick 2.8 +import QtQuick.Controls 2.1 +import QtQuick.Controls.impl 2.1 Item { implicitWidth: 56 @@ -47,9 +49,9 @@ Item { width: 56 height: 16 radius: 8 - color: control.checked ? (control.visualFocus ? "#0066ff" : "#353637") : "#e0e0e0" + color: control.checked ? (control.visualFocus ? Default.focusColor : Default.buttonCheckedColor) : Default.buttonColor border.width: control.visualFocus ? 2 : 0 - border.color: "#0066ff" + border.color: Default.focusColor } Rectangle { @@ -58,9 +60,13 @@ Item { width: 28 height: 28 radius: 16 - color: control.enabled ? (control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : (control.visualFocus ? "#f0f6ff" : "#ffffff")) : "#fdfdfd" + color: control.enabled ? (control.down + ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor) + : (control.visualFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor border.width: control.visualFocus ? 2 : 1 - border.color: control.enabled ? (control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090")) : "#d6d6d6" + border.color: control.enabled ? (control.visualFocus + ? Default.focusColor + : (control.down ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor Behavior on x { enabled: !control.down |