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"
|
checked: subsurfaceTheme.currentTheme === "Blue"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
blueTheme()
|
blueTheme()
|
||||||
|
manager.theme = subsurfaceTheme.currentTheme
|
||||||
|
manager.savePreferences()
|
||||||
}
|
}
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
implicitWidth: 20
|
implicitWidth: 20
|
||||||
|
@ -175,6 +177,8 @@ Kirigami.ScrollablePage {
|
||||||
Layout.preferredWidth: settingsPage.col4Width
|
Layout.preferredWidth: settingsPage.col4Width
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pinkTheme()
|
pinkTheme()
|
||||||
|
manager.theme = subsurfaceTheme.currentTheme
|
||||||
|
manager.savePreferences()
|
||||||
}
|
}
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
implicitWidth: 20
|
implicitWidth: 20
|
||||||
|
@ -244,6 +248,8 @@ Kirigami.ScrollablePage {
|
||||||
Layout.preferredWidth: settingsPage.col4Width
|
Layout.preferredWidth: settingsPage.col4Width
|
||||||
onClicked: {
|
onClicked: {
|
||||||
darkTheme()
|
darkTheme()
|
||||||
|
manager.theme = subsurfaceTheme.currentTheme
|
||||||
|
manager.savePreferences()
|
||||||
}
|
}
|
||||||
indicator: Rectangle {
|
indicator: Rectangle {
|
||||||
implicitWidth: 20
|
implicitWidth: 20
|
||||||
|
@ -296,6 +302,10 @@ Kirigami.ScrollablePage {
|
||||||
id: distanceThreshold
|
id: distanceThreshold
|
||||||
text: manager.distanceThreshold
|
text: manager.distanceThreshold
|
||||||
Layout.preferredWidth: settingsPage.col4Width
|
Layout.preferredWidth: settingsPage.col4Width
|
||||||
|
onEditingFinished: {
|
||||||
|
manager.distanceThreshold = distanceThreshold.text
|
||||||
|
manager.savePreferences()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
@ -308,6 +318,10 @@ Kirigami.ScrollablePage {
|
||||||
id: timeThreshold
|
id: timeThreshold
|
||||||
text: manager.timeThreshold
|
text: manager.timeThreshold
|
||||||
Layout.preferredWidth: settingsPage.col4Width
|
Layout.preferredWidth: settingsPage.col4Width
|
||||||
|
onEditingFinished: {
|
||||||
|
manager.timeThreshold = timeThreshold.text
|
||||||
|
manager.savePreferences()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
|
|
Loading…
Add table
Reference in a new issue