summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2017-07-08 19:17:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-09 03:06:04 +0900
commit4698b86b131401d73c70095722c83caa5fe188e8 (patch)
tree60713b22b588331a58383a56a5d65c62f0b5b2ff
parent4c4b72853cf08751515ffc4ff858c365c5db2cfd (diff)
downloadsubsurface-4698b86b131401d73c70095722c83caa5fe188e8.tar.gz
QML UI: Style the radio buttons
This styles the radio buttons in the preferences pane so they follows the theme colors. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
-rw-r--r--mobile-widgets/qml/Preferences.qml60
1 files changed, 60 insertions, 0 deletions
diff --git a/mobile-widgets/qml/Preferences.qml b/mobile-widgets/qml/Preferences.qml
index 4e0ac87f1..9b9aaa833 100644
--- a/mobile-widgets/qml/Preferences.qml
+++ b/mobile-widgets/qml/Preferences.qml
@@ -52,10 +52,30 @@ Kirigami.Page {
}
RadioButton {
+ id: bluebutton
checked: subsurfaceTheme.currentTheme === "Blue"
onClicked: {
blueTheme()
}
+ indicator: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ x: bluebutton.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ border.color: bluebutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ color: subsurfaceTheme.backgroundColor
+
+ Rectangle {
+ width: 12
+ height: 12
+ x: 4
+ y: 4
+ radius: 3
+ color: bluebutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ visible: bluebutton.checked
+ }
+ }
}
Row {
Label {
@@ -98,10 +118,30 @@ Kirigami.Page {
}
RadioButton {
+ id: pinkbutton
checked: subsurfaceTheme.currentTheme === "Pink"
onClicked: {
pinkTheme()
}
+ indicator: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ x: pinkbutton.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ border.color: pinkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ color: subsurfaceTheme.backgroundColor
+
+ Rectangle {
+ width: 12
+ height: 12
+ x: 4
+ y: 4
+ radius: 3
+ color: pinkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ visible: pinkbutton.checked
+ }
+ }
}
Row {
Label {
@@ -144,10 +184,30 @@ Kirigami.Page {
}
RadioButton {
+ id: darkbutton
checked: subsurfaceTheme.currentTheme === "Dark"
onClicked: {
darkTheme()
}
+ indicator: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ x: darkbutton.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ border.color: darkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ color: subsurfaceTheme.backgroundColor
+
+ Rectangle {
+ width: 12
+ height: 12
+ x: 4
+ y: 4
+ radius: 3
+ color: darkbutton.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ visible: darkbutton.checked
+ }
+ }
}
Row {
Label {