forked from Shinonome/dots-hyprland
StyledText: fix text being offset with rapid change (#1942)
This commit is contained in:
@@ -25,6 +25,11 @@ Text {
|
|||||||
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
textAnimationBehavior.originalX = root.x;
|
||||||
|
textAnimationBehavior.originalY = root.y;
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on text {
|
Behavior on text {
|
||||||
id: textAnimationBehavior
|
id: textAnimationBehavior
|
||||||
property real originalX: root.x
|
property real originalX: root.x
|
||||||
@@ -33,12 +38,6 @@ Text {
|
|||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
alwaysRunToEnd: true
|
alwaysRunToEnd: true
|
||||||
ScriptAction {
|
|
||||||
script: textAnimationBehavior.originalX = root.x;
|
|
||||||
}
|
|
||||||
ScriptAction {
|
|
||||||
script: textAnimationBehavior.originalY = root.y;
|
|
||||||
}
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
Anim {
|
Anim {
|
||||||
property: "x"
|
property: "x"
|
||||||
|
|||||||
Reference in New Issue
Block a user