From 8a4e3f8bb1748bd8a00706b0e2d2169b21e3112f Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 17 Feb 2026 13:53:17 -0500 Subject: [PATCH] system updater: fix hide no update option --- .../Modules/DankBar/Widgets/SystemUpdate.qml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml index 99fc0f84..b44372d1 100644 --- a/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml +++ b/quickshell/Modules/DankBar/Widgets/SystemUpdate.qml @@ -10,6 +10,45 @@ BasePill { property bool isActive: false readonly property bool hasUpdates: SystemUpdateService.updateCount > 0 readonly property bool isChecking: SystemUpdateService.isChecking + readonly property bool shouldHide: SettingsData.updaterHideWidget && !hasUpdates && !isChecking && !SystemUpdateService.hasError + + opacity: shouldHide ? 0 : 1 + + states: [ + State { + name: "hidden_horizontal" + when: root.shouldHide && !isVerticalOrientation + PropertyChanges { + target: root + width: 0 + } + }, + State { + name: "hidden_vertical" + when: root.shouldHide && isVerticalOrientation + PropertyChanges { + target: root + height: 0 + } + } + ] + + transitions: [ + Transition { + NumberAnimation { + properties: "width,height" + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + ] + + Behavior on opacity { + NumberAnimation { + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } Ref { service: SystemUpdateService