Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Current Qt Quick animations like PropertyAnimation, NumberAnimation etc. are designed for cases where animating values from A to B with a duration. If user wants to change the duration while the animation is running, this doesn't really work. Duration changes are applied when the animation next time restarts. This is understandable since duration affects easing, which can't be smoothly readjusted while duration changes.
Consider adding new "animationSpeed" property defaulting to 1.0 which could be modified during the animation runtime to dynamically adjust the animation speed. Due to animations architecture, this could be available just for groups (SequentialAnimation & ParallelAnimation). QML Animation (https://doc.qt.io/qt-6/qml-qtquick-animation.html) is probably a bit too abstact for this as it doesn't contain duration etc. either. Also it could be added into PropertyAnimation (https://doc.qt.io/qt-6/qml-qtquick-propertyanimation.html) but then it wouldn't exist for SequentialAnimation & ParallelAnimation which are probably the most important users and also speed calculations become more costly if all sub-animations can have own animationSpeed and total inherited animationSpeed needs to be calculated.
Use cases:
1) Allow changing a running animation speed: Duration can not be adjusted when the animation is running, but it is possible to adjust speed as that only affects the future and not past (easing). There are different use-cases where animation speed should be freely adjustable during the runtime.
2) Simply adjust the group animations: Say you have a complicated SeqentialAnimation / ParallelAnimation set and you have fine tuned durations of its subanimations. Now there is a request to see what it would look like 10 - 20 % faster. Currently that would require changing duration of each child animation. With animationSpeed it can be done easily with a single property.
3) Easier slow-motion: Sometime there is a need to provide "slow motion" mode. With animationSpeed that can be more easily achieved to required animation groups than applying multiplier to all durations.
Attachments
Issue Links
- relates to
-
QTBUG-97411 Allow slowing animations
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-107163 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
436288,1 | WIP: Add animationSpeed support to group animations | dev | qt/qtdeclarative | Status: NEW | -2 | 0 |