aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/Switch.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-07-10 13:15:16 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-14 11:34:58 +0000
commitc9ca69318620e7c12fbf5c733922232224d21886 (patch)
tree594182e304e6453419bb6168f3365b9ca54707fe /src/imports/controls/Switch.qml
parent185613f2eecb094cd119558c807679fc34929b05 (diff)
Tweak default control sizes using Android as a reference.
Change-Id: Iaa62f9ba650ff4f60e6370a770fb0af2645eafb5 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/Switch.qml')
-rw-r--r--src/imports/controls/Switch.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index c38e36cb..9e924872 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -70,9 +70,9 @@ AbstractSwitch {
color: control.Theme.backgroundColor
Rectangle {
- width: 12
- height: 12
- radius: 6
+ width: 20
+ height: 20
+ radius: 10
color: Qt.tint(control.checked && !control.enabled ? control.Theme.disabledColor :
control.checked && control.activeFocus ? control.Theme.focusColor :
@@ -81,7 +81,7 @@ AbstractSwitch {
border.width: control.checked || control.pressed ? 0 : 1
border.color: control.Theme.frameColor
- x: Math.max(4, Math.min(parent.width - width - 4,
+ x: Math.max(0, Math.min(parent.width - width,
control.visualPosition * parent.width - (width / 2)))
y: (parent.height - height) / 2