fix: dash perf battery animating on init
It's noisy since the fill is secondary, so don't animate on init
This commit is contained in:
parent
bed81f71fa
commit
f829fc882c
1 changed files with 7 additions and 5 deletions
|
|
@ -9,12 +9,18 @@ import qs.services
|
||||||
StyledClippingRect {
|
StyledClippingRect {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property real animPerc: UPower.displayDevice.percentage
|
||||||
|
|
||||||
color: Colours.palette.m3secondaryContainer
|
color: Colours.palette.m3secondaryContainer
|
||||||
radius: Tokens.rounding.large
|
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
|
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
|
implicitHeight: Tokens.sizes.dashboard.perfBattHeight
|
||||||
|
|
||||||
|
Behavior on animPerc {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
|
||||||
Contents {
|
Contents {
|
||||||
id: layout
|
id: layout
|
||||||
|
|
||||||
|
|
@ -30,16 +36,12 @@ StyledClippingRect {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
implicitHeight: parent.height * UPower.displayDevice.percentage
|
implicitHeight: parent.height * root.animPerc
|
||||||
|
|
||||||
color: Colours.palette.m3secondary
|
color: Colours.palette.m3secondary
|
||||||
radius: Tokens.rounding.extraSmall
|
radius: Tokens.rounding.extraSmall
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Contents {
|
Contents {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue