mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bc0f473908
commit
ee210c3bcd
1 changed files with 14 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue