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
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
// The only setting that can change outside this page
|
||||
autoStopCharging.checked = settings.limitEnabled
|
||||
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("Charger control enabled updated")
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
anchors.fill: parent
|
||||
contentHeight: header.height + settingsColumn.height + Theme.horizontalPageMargin
|
||||
|
|
Loading…
Reference in a new issue