summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/CloudCredentials.qml
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2017-07-20 20:43:17 +1200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-23 03:20:58 +0900
commit213f68d922815d40786a18d29621441ea036aa0b (patch)
tree1ea0ee9470293e8f920725690170b76c90285366 /mobile-widgets/qml/CloudCredentials.qml
parent8d2b59ff31a3ae3c5113e5ed09317187650ec8b1 (diff)
downloadsubsurface-213f68d922815d40786a18d29621441ea036aa0b.tar.gz
Mobile settings: stylize switches
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/CloudCredentials.qml')
-rw-r--r--mobile-widgets/qml/CloudCredentials.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/mobile-widgets/qml/CloudCredentials.qml b/mobile-widgets/qml/CloudCredentials.qml
index 476e5e29b..352c4ecf4 100644
--- a/mobile-widgets/qml/CloudCredentials.qml
+++ b/mobile-widgets/qml/CloudCredentials.qml
@@ -97,6 +97,27 @@ Item {
onCheckedChanged: {
password.echoMode = checked ? TextInput.Normal : TextInput.Password
}
+ indicator: Rectangle {
+ implicitWidth: Kirigami.Units.largeSpacing * 3
+ implicitHeight: Kirigami.Units.largeSpacing
+ x: showPassword.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: Kirigami.Units.largeSpacing * 0.5
+ color: showPassword.checked ?
+ subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor
+ border.color: subsurfaceTheme.darkerPrimaryColor
+
+ Rectangle {
+ x: showPassword.checked ? parent.width - width : 0
+ y: parent.height / 2 - height / 2
+ width: Kirigami.Units.largeSpacing * 1.5
+ height: Kirigami.Units.largeSpacing * 1.5
+ radius: height / 2
+ color: showPassword.down || showPassword.checked ?
+ subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor
+ border.color: subsurfaceTheme.darkerPrimaryColor
+ }
+ }
}
}