forked from Shinonome/dots-hyprland
wbar: make task view btn anim less weird
This commit is contained in:
@@ -17,10 +17,12 @@ BarButton {
|
|||||||
rightInset: 2
|
rightInset: 2
|
||||||
implicitWidth: height - topInset - bottomInset + leftInset + rightInset
|
implicitWidth: height - topInset - bottomInset + leftInset + rightInset
|
||||||
|
|
||||||
|
property real pressedScale: 5/6
|
||||||
|
|
||||||
onDownChanged: {
|
onDownChanged: {
|
||||||
scaleAnim.duration = root.down ? 150 : 200
|
scaleAnim.duration = root.down ? 150 : 200
|
||||||
scaleAnim.easing.bezierCurve = root.down ? Looks.transition.easing.bezierCurve.easeIn : Looks.transition.easing.bezierCurve.easeOut
|
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 {
|
background: Item {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ AppButton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
iconName: (down && !checked) ? "task-view-pressed" : "task-view"
|
iconName: (down && !checked) ? "task-view-pressed" : "task-view"
|
||||||
|
pressedScale: checked ? 5/6 : 1
|
||||||
separateLightDark: true
|
separateLightDark: true
|
||||||
|
|
||||||
checked: GlobalStates.overviewOpen
|
checked: GlobalStates.overviewOpen
|
||||||
|
|||||||
Reference in New Issue
Block a user