Fix ArchUpdater NCheckbox binding

ArchUpdater: Create proper binding, make selective update more robust
This commit is contained in:
Ly-sec 2025-08-28 19:48:20 +02:00
parent 6ac172fe02
commit cbd71bec49
4 changed files with 51 additions and 19 deletions

View file

@ -112,7 +112,11 @@ NPanel {
label: ""
description: ""
checked: ArchUpdaterService.isPackageSelected(modelData.name)
onToggled: ArchUpdaterService.togglePackageSelection(modelData.name)
onToggled: function (checked) {
ArchUpdaterService.togglePackageSelection(modelData.name)
// Force refresh of the checked property
checkbox.checked = ArchUpdaterService.isPackageSelected(modelData.name)
}
activeColor: (modelData.source === "aur") ? Color.mSecondary : Color.mPrimary
activeOnColor: (modelData.source === "aur") ? Color.mOnSecondary : Color.mOnPrimary
Layout.fillWidth: false

View file

@ -303,11 +303,11 @@ ColumnLayout {
}
}
// Temperature
// Temperature
ColumnLayout {
spacing: Style.marginXS * scaling
Layout.alignment: Qt.AlignVCenter
NLabel {
label: "Color temperature"
description: "Select two temperatures in Kelvin"
@ -317,7 +317,7 @@ ColumnLayout {
visible: Settings.data.nightLight.enabled
spacing: Style.marginM * scaling
Layout.fillWidth: false
Layout.fillHeight: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignVCenter
NText {