summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Jocke <j.bygdell@gmail.com>2018-10-21 16:55:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-21 14:43:41 -0400
commit9c6d24e50e223b62ce338ae4e802942c25da6872 (patch)
treee8d2faf872cbdb6e5357feacf33d8a2f48676d3b /mobile-widgets/qml
parent6ed5db4d51e3852916db64f2220004dbd04847fc (diff)
downloadsubsurface-9c6d24e50e223b62ce338ae4e802942c25da6872.tar.gz
Mobile UI: make SsrfSwitch resizable
Back in 8ab8a67f the checkbox where made resizable. This applies the same functionality to the selector switch and makes the two objects match in vertical size. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/SsrfSwitch.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/mobile-widgets/qml/SsrfSwitch.qml b/mobile-widgets/qml/SsrfSwitch.qml
index a08d8a92c..0986a4436 100644
--- a/mobile-widgets/qml/SsrfSwitch.qml
+++ b/mobile-widgets/qml/SsrfSwitch.qml
@@ -6,8 +6,8 @@ import org.kde.kirigami 2.4 as Kirigami
Switch {
id: root
indicator: Rectangle {
- implicitWidth: Kirigami.Units.largeSpacing * 2.2
- implicitHeight: Kirigami.Units.largeSpacing * 0.75
+ implicitWidth: 36 * PrefDisplay.mobile_scale
+ implicitHeight: 12 * PrefDisplay.mobile_scale
x: root.leftPadding
y: parent.height / 2 - height / 2
radius: height / 2
@@ -18,8 +18,8 @@ Switch {
Rectangle {
x: root.checked ? parent.width - width : 0
y: parent.height / 2 - height / 2
- width: Kirigami.Units.largeSpacing * 1.1
- height: Kirigami.Units.largeSpacing * 1.1
+ width: 20 * PrefDisplay.mobile_scale
+ height: 20 * PrefDisplay.mobile_scale
radius: height / 2
color: root.down || root.checked ?
subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor