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:
parent
8e0264d034
commit
028421c4d7
2 changed files with 6 additions and 0 deletions
|
@ -13,9 +13,11 @@ FocusScope {
|
||||||
id: container
|
id: container
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
|
property bool animationEnabled: false
|
||||||
property bool organized: false
|
property bool organized: false
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
|
container.animationEnabled = true;
|
||||||
container.organized = true;
|
container.organized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +86,7 @@ FocusScope {
|
||||||
width: heapArea.width
|
width: heapArea.width
|
||||||
height: heapArea.height
|
height: heapArea.height
|
||||||
focus: true
|
focus: true
|
||||||
|
animationEnabled: container.animationEnabled
|
||||||
organized: container.organized
|
organized: container.organized
|
||||||
model: KWinComponents.ClientFilterModel {
|
model: KWinComponents.ClientFilterModel {
|
||||||
activity: KWinComponents.Workspace.currentActivity
|
activity: KWinComponents.Workspace.currentActivity
|
||||||
|
|
|
@ -23,6 +23,8 @@ FocusScope {
|
||||||
|
|
||||||
property alias model: windowsRepeater.model
|
property alias model: windowsRepeater.model
|
||||||
property int selectedIndex: -1
|
property int selectedIndex: -1
|
||||||
|
property bool animationEnabled: false
|
||||||
|
|
||||||
required property bool organized
|
required property bool organized
|
||||||
|
|
||||||
ExpoLayout {
|
ExpoLayout {
|
||||||
|
@ -99,6 +101,7 @@ FocusScope {
|
||||||
]
|
]
|
||||||
|
|
||||||
component TweenBehavior : Behavior {
|
component TweenBehavior : Behavior {
|
||||||
|
enabled: heap.animationEnabled
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: effect.animationDuration
|
duration: effect.animationDuration
|
||||||
easing.type: Easing.InOutCubic
|
easing.type: Easing.InOutCubic
|
||||||
|
|
Loading…
Reference in a new issue