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