diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2017-07-20 21:53:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-23 03:20:58 +0900 |
commit | ee210c3bcdbbe174c6b519896fd1b3e3c3d8ec03 (patch) | |
tree | 34ddce308ce09ae10846e67c85b8239d183cb5a8 /mobile-widgets | |
parent | bc0f4739083ea71521fdb9f5b4cd9a610e7f54d5 (diff) | |
download | subsurface-ee210c3bcdbbe174c6b519896fd1b3e3c3d8ec03.tar.gz |
QML UI: enable auto-save on settings page
Automatically save changes made on the settings page on completion of text fields or theme checkboxes.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/Settings.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 5e4553518..4cd28bb14 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -106,6 +106,8 @@ Kirigami.ScrollablePage { checked: subsurfaceTheme.currentTheme === "Blue" onClicked: { blueTheme() + manager.theme = subsurfaceTheme.currentTheme + manager.savePreferences() } indicator: Rectangle { implicitWidth: 20 @@ -175,6 +177,8 @@ Kirigami.ScrollablePage { Layout.preferredWidth: settingsPage.col4Width onClicked: { pinkTheme() + manager.theme = subsurfaceTheme.currentTheme + manager.savePreferences() } indicator: Rectangle { implicitWidth: 20 @@ -244,6 +248,8 @@ Kirigami.ScrollablePage { Layout.preferredWidth: settingsPage.col4Width onClicked: { darkTheme() + manager.theme = subsurfaceTheme.currentTheme + manager.savePreferences() } indicator: Rectangle { implicitWidth: 20 @@ -296,6 +302,10 @@ Kirigami.ScrollablePage { id: distanceThreshold text: manager.distanceThreshold Layout.preferredWidth: settingsPage.col4Width + onEditingFinished: { + manager.distanceThreshold = distanceThreshold.text + manager.savePreferences() + } } Kirigami.Label { @@ -308,6 +318,10 @@ Kirigami.ScrollablePage { id: timeThreshold text: manager.timeThreshold Layout.preferredWidth: settingsPage.col4Width + onEditingFinished: { + manager.timeThreshold = timeThreshold.text + manager.savePreferences() + } } Kirigami.Label { |