From e9fd2f89fed507d6ef0075f2bb831eb2018f191d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 8 Sep 2025 23:13:43 +0200 Subject: [PATCH] StyledText: fix text being offset with rapid change (#1942) --- .../ii/modules/common/widgets/StyledText.qml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.config/quickshell/ii/modules/common/widgets/StyledText.qml b/.config/quickshell/ii/modules/common/widgets/StyledText.qml index de4e2be96..4f07d67ef 100644 --- a/.config/quickshell/ii/modules/common/widgets/StyledText.qml +++ b/.config/quickshell/ii/modules/common/widgets/StyledText.qml @@ -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"