summaryrefslogtreecommitdiff
path: root/components/IText.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/IText.qml')
-rw-r--r--components/IText.qml28
1 files changed, 11 insertions, 17 deletions
diff --git a/components/IText.qml b/components/IText.qml
index c528dc2..413da2c 100644
--- a/components/IText.qml
+++ b/components/IText.qml
@@ -30,26 +30,20 @@ Text {
}
}
- Behavior on text {
- enabled: root.animate
-
- SequentialAnimation {
- Anim {
- to: root.animateFrom
- easing.bezierCurve: Style.anim.curves.standardAccel
- }
- PropertyAction {}
- Anim {
- to: root.animateTo
- easing.bezierCurve: Style.anim.curves.standardDecel
- }
- }
- }
-
- component Anim: NumberAnimation {
+ NumberAnimation {
+ id: scaleAnim
target: root
property: "scale"
duration: General.animationDuration / 4
easing.type: Easing.BezierSpline
}
+
+ onTextChanged: {
+ if (animate) {
+ root.scale = animateFrom;
+ scaleAnim.to = animateTo;
+ scaleAnim.easing.bezierCurve = Style.anim.curves.standardAccel;
+ scaleAnim.start();
+ }
+ }
}