aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Switch.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-27 00:57:26 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-30 08:24:42 +0000
commit2ba8261fee95cca0d119879a95f871133f0b51d5 (patch)
tree0dc1471967a3ba3daca026aaace737a8b67b0585 /src/imports/controls/Switch.qml
parente7869a71faf9d3b2c120e734c7323df0bf41dff6 (diff)
Control::spacing
Change-Id: I67d81db16e95813b1ed9903017ce4d272093f7bb Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/Switch.qml')
-rw-r--r--src/imports/controls/Switch.qml7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index c1661f35..e61fb152 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 ? Theme.spacing : 0) + leftPadding + rightPadding)
+ (label && indicator ? spacing : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
Math.max(label ? label.implicitHeight : 0,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
@@ -55,6 +55,7 @@ AbstractSwitch {
Accessible.role: Accessible.Button // TODO: Switch?
padding: Theme.padding
+ spacing: Theme.spacing
//! [indicator]
indicator: Rectangle {
@@ -94,9 +95,9 @@ AbstractSwitch {
//! [label]
label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.Theme.spacing)
+ x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
y: control.topPadding
- width: control.availableWidth - indicator.width - control.Theme.spacing
+ width: control.availableWidth - indicator.width - control.spacing
height: control.availableHeight
text: control.text