Replaced the old checkboxes in ArchUpdaterPanel with NCheckbox

ArchUpdater: use NCheckbox to make things more uniform
This commit is contained in:
Ly-sec 2025-08-28 17:03:28 +02:00
parent d0b7ccf302
commit 82d71d65fa
2 changed files with 15 additions and 10 deletions

View file

@ -106,14 +106,16 @@ NPanel {
anchors.margins: Style.marginS * scaling
spacing: Style.marginS * scaling
// Checkbox for selection (pure bindings; no imperative state)
NIconButton {
// Checkbox for selection
NCheckbox {
id: checkbox
icon: ArchUpdaterService.isPackageSelected(modelData.name) ? "check_box" : "check_box_outline_blank"
onClicked: ArchUpdaterService.togglePackageSelection(modelData.name)
colorBg: Color.transparent
colorFg: ArchUpdaterService.isPackageSelected(
modelData.name) ? ((modelData.source === "aur") ? Color.mSecondary : Color.mPrimary) : Color.mOnSurfaceVariant
label: ""
description: ""
checked: (ArchUpdaterService.selectedPackagesCount, ArchUpdaterService.isPackageSelected(modelData.name))
onToggled: ArchUpdaterService.togglePackageSelection(modelData.name)
activeColor: (modelData.source === "aur") ? Color.mSecondary : Color.mPrimary
activeOnColor: (modelData.source === "aur") ? Color.mOnSecondary : Color.mOnPrimary
Layout.fillWidth: false
Layout.preferredWidth: 30 * scaling
Layout.preferredHeight: 30 * scaling
}