effects/overview: Disable animations until started

Once an animation starts due to property change, it cannot be easily
re-targeted. This can cause undesired animation jumps if a property
changes during startup (for example from 0 to its final value).

With this change, the window heap's animation will be disabled until
the effect starts the intro animation.
This commit is contained in:
Vlad Zahorodnii 2021-08-26 12:03:24 +03:00
parent 8e0264d034
commit 028421c4d7
2 changed files with 6 additions and 0 deletions

View file

@ -13,9 +13,11 @@ FocusScope {
id: container
focus: true
property bool animationEnabled: false
property bool organized: false
function start() {
container.animationEnabled = true;
container.organized = true;
}
@ -84,6 +86,7 @@ FocusScope {
width: heapArea.width
height: heapArea.height
focus: true
animationEnabled: container.animationEnabled
organized: container.organized
model: KWinComponents.ClientFilterModel {
activity: KWinComponents.Workspace.currentActivity

View file

@ -23,6 +23,8 @@ FocusScope {
property alias model: windowsRepeater.model
property int selectedIndex: -1
property bool animationEnabled: false
required property bool organized
ExpoLayout {
@ -99,6 +101,7 @@ FocusScope {
]
component TweenBehavior : Behavior {
enabled: heap.animationEnabled
NumberAnimation {
duration: effect.animationDuration
easing.type: Easing.InOutCubic