Improve Settings page loading
This commit is contained in:
parent
bfd9c62dcf
commit
366cafde42
1 changed files with 13 additions and 6 deletions
|
@ -33,16 +33,23 @@ Page {
|
||||||
interval: 10
|
interval: 10
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
// The only setting that can change outside this page
|
||||||
autoStopCharging.checked = settings.limitEnabled
|
autoStopCharging.checked = settings.limitEnabled
|
||||||
highLimitSlider.value = settings.highLimit
|
console.debug("Charger control enabled updated")
|
||||||
lowLimitSlider.value = settings.lowLimit
|
|
||||||
notificationsSwitch.checked = settings.notificationsEnabled
|
|
||||||
highAlertSlider.value = settings.highAlert
|
|
||||||
lowAlertSlider.value = settings.lowAlert
|
|
||||||
intervalSlider.value = settings.interval
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
// These we can read only once
|
||||||
|
highLimitSlider.value = settings.highLimit
|
||||||
|
lowLimitSlider.value = settings.lowLimit
|
||||||
|
notificationsSwitch.checked = settings.notificationsEnabled
|
||||||
|
highAlertSlider.value = settings.highAlert
|
||||||
|
lowAlertSlider.value = settings.lowAlert
|
||||||
|
intervalSlider.value = settings.interval
|
||||||
|
console.debug("SettingsPage values updated")
|
||||||
|
}
|
||||||
|
|
||||||
SilicaFlickable {
|
SilicaFlickable {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
contentHeight: header.height + settingsColumn.height + Theme.horizontalPageMargin
|
contentHeight: header.height + settingsColumn.height + Theme.horizontalPageMargin
|
||||||
|
|
Loading…
Reference in a new issue