From f829fc882c7a9885814aee99e25989f2a8d937f0 Mon Sep 17 00:00:00 2001 From: Soramane <61896496+soramanew@users.noreply.github.com> Date: Fri, 22 May 2026 17:30:07 +0800 Subject: [PATCH] fix: dash perf battery animating on init It's noisy since the fill is secondary, so don't animate on init --- modules/dashboard/performance/BatteryTank.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/dashboard/performance/BatteryTank.qml b/modules/dashboard/performance/BatteryTank.qml index 1478af65..691405db 100644 --- a/modules/dashboard/performance/BatteryTank.qml +++ b/modules/dashboard/performance/BatteryTank.qml @@ -9,12 +9,18 @@ import qs.services StyledClippingRect { id: root + property real animPerc: UPower.displayDevice.percentage + color: Colours.palette.m3secondaryContainer radius: Tokens.rounding.large implicitWidth: Config.dashboard.performance.showCpu || (Config.dashboard.performance.showGpu && Gpu.type !== Gpu.None) || Config.dashboard.performance.showStorage || Config.dashboard.performance.showMemory ? Tokens.sizes.dashboard.perfBattWidth : Tokens.sizes.dashboard.perfBattWidthSingle implicitHeight: Tokens.sizes.dashboard.perfBattHeight + Behavior on animPerc { + Anim {} + } + Contents { id: layout @@ -30,16 +36,12 @@ StyledClippingRect { anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom - implicitHeight: parent.height * UPower.displayDevice.percentage + implicitHeight: parent.height * root.animPerc color: Colours.palette.m3secondary radius: Tokens.rounding.extraSmall clip: true - Behavior on implicitHeight { - Anim {} - } - Contents { anchors.left: parent.left anchors.right: parent.right