aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Switch.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-04-08 18:16:13 +0200
committerJari-Pekka Nurmi <jpnurmi@theqtcompany.com>2015-04-08 19:18:02 +0300
commit7b971c28e6098b629b8e9e3e38a9465a3f1bd459 (patch)
treec5c475894671c0cc7e38d59287d3c2d6ba46128b /src/imports/controls/Switch.qml
parent1c0edf002a50a765a66349d733cf170f4a4024ef (diff)
Rename Style to Theme
Change-Id: I0186cd36f0b42ca015b70a09af27f8a3517d4a60 Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/Switch.qml')
-rw-r--r--src/imports/controls/Switch.qml26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 58b4b9c1..ccfdaa3c 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -43,7 +43,7 @@ AbstractSwitch {
implicitWidth: Math.max(background ? background.implicitWidth : 0,
(label ? label.implicitWidth : 0) +
(indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? Style.spacing : 0) + leftPadding + rightPadding)
+ (label && indicator ? Theme.spacing : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
Math.max(label ? label.implicitHeight : 0,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
@@ -54,7 +54,7 @@ AbstractSwitch {
Accessible.pressed: pressed
Accessible.role: Accessible.Button // TODO: Switch?
- padding: Style.padding
+ padding: Theme.padding
indicator: Rectangle {
readonly property bool mirror: control.effectiveLayoutDirection == Qt.RightToLeft
@@ -66,20 +66,20 @@ AbstractSwitch {
radius: 10
border.width: control.activeFocus ? 2 : 1
- border.color: control.activeFocus ? control.Style.focusColor : control.Style.frameColor
- opacity: enabled ? 1.0 : control.Style.disabledOpacity
- color: control.Style.backgroundColor
+ border.color: control.activeFocus ? control.Theme.focusColor : control.Theme.frameColor
+ opacity: enabled ? 1.0 : control.Theme.disabledOpacity
+ color: control.Theme.backgroundColor
Rectangle {
width: 12
height: 12
radius: 6
- color: Qt.tint(Qt.tint(control.checked ? control.Style.accentColor : control.Style.baseColor,
- control.checked && control.activeFocus ? control.Style.focusColor : "transparent"),
- control.pressed ? control.Style.pressColor : "transparent")
+ 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")
border.width: control.checked || control.pressed ? 0 : 1
- border.color: control.Style.frameColor
+ border.color: control.Theme.frameColor
x: Math.max(4, Math.min(parent.width - width - 4,
control.visualPosition * parent.width - (width / 2)))
@@ -95,16 +95,16 @@ AbstractSwitch {
label: Text {
readonly property bool mirror: control.effectiveLayoutDirection == Qt.RightToLeft
- x: mirror ? control.leftPadding : (indicator.x + indicator.width + control.Style.spacing)
+ x: mirror ? control.leftPadding : (indicator.x + indicator.width + control.Theme.spacing)
y: control.topPadding
- width: parent.width - indicator.width - control.Style.spacing - control.leftPadding - control.rightPadding
+ width: parent.width - indicator.width - control.Theme.spacing - control.leftPadding - control.rightPadding
height: parent.height - control.topPadding - control.bottomPadding
text: control.text
- color: control.Style.textColor
+ color: control.Theme.textColor
elide: Text.ElideRight
visible: control.text
- opacity: enabled ? 1.0 : control.Style.disabledOpacity
+ opacity: enabled ? 1.0 : control.Theme.disabledOpacity
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}