wbar: make task view btn anim less weird

This commit is contained in:
end-4
2025-11-16 00:10:55 +01:00
parent 4abfcd0162
commit 885a9eb0b3
2 changed files with 4 additions and 1 deletions
@@ -17,10 +17,12 @@ BarButton {
rightInset: 2
implicitWidth: height - topInset - bottomInset + leftInset + rightInset
property real pressedScale: 5/6
onDownChanged: {
scaleAnim.duration = root.down ? 150 : 200
scaleAnim.easing.bezierCurve = root.down ? Looks.transition.easing.bezierCurve.easeIn : Looks.transition.easing.bezierCurve.easeOut
contentItem.scale = root.down ? 5/6 : 1 // If/When we do dragging, the scale is 1.25
contentItem.scale = root.down ? root.pressedScale : 1 // If/When we do dragging, the scale is 1.25
}
background: Item {
@@ -10,6 +10,7 @@ AppButton {
id: root
iconName: (down && !checked) ? "task-view-pressed" : "task-view"
pressedScale: checked ? 5/6 : 1
separateLightDark: true
checked: GlobalStates.overviewOpen