forked from Shinonome/dots-hyprland
adjust ripple anim
This commit is contained in:
@@ -12,7 +12,7 @@ TabButton {
|
|||||||
property string buttonIcon
|
property string buttonIcon
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
property int tabContentWidth: contentItem.children[0].implicitWidth
|
property int tabContentWidth: contentItem.children[0].implicitWidth
|
||||||
property int rippleDuration: 1000
|
property int rippleDuration: 1200
|
||||||
height: buttonBackground.height
|
height: buttonBackground.height
|
||||||
|
|
||||||
PointingHandInteraction {}
|
PointingHandInteraction {}
|
||||||
@@ -20,13 +20,12 @@ TabButton {
|
|||||||
component RippleAnim: NumberAnimation {
|
component RippleAnim: NumberAnimation {
|
||||||
duration: rippleDuration
|
duration: rippleDuration
|
||||||
easing.type: Appearance.animation.elementMoveEnter.type
|
easing.type: Appearance.animation.elementMoveEnter.type
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveEnter.bezierCurve
|
easing.bezierCurve: Appearance.animationCurves.standardDecel
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onPressed: (event) => {
|
onPressed: (event) => {
|
||||||
|
|
||||||
const {x,y} = event
|
const {x,y} = event
|
||||||
const stateY = buttonBackground.y;
|
const stateY = buttonBackground.y;
|
||||||
rippleAnim.x = x;
|
rippleAnim.x = x;
|
||||||
|
|||||||
Reference in New Issue
Block a user