StyledText: fix text being offset with rapid change (#1942)

This commit is contained in:
end-4 2025-09-08 23:13:43 +02:00
parent 5565911e2c
commit e9fd2f89fe

View file

@ -25,6 +25,11 @@ Text {
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
}
Component.onCompleted: {
textAnimationBehavior.originalX = root.x;
textAnimationBehavior.originalY = root.y;
}
Behavior on text {
id: textAnimationBehavior
property real originalX: root.x
@ -33,12 +38,6 @@ Text {
SequentialAnimation {
alwaysRunToEnd: true
ScriptAction {
script: textAnimationBehavior.originalX = root.x;
}
ScriptAction {
script: textAnimationBehavior.originalY = root.y;
}
ParallelAnimation {
Anim {
property: "x"