Verified Commit 2bca18bc authored by ivan tkachenko's avatar ivan tkachenko
Browse files

effects/overview: Fix animation of windows scaling back from a desktop bar

Due to nondeterministic nature of signal propagation in QML, changing
both targetScale and state depending on dragHandler's activity could
result in targetScale wrongly updating before the state change(and thus
applied property changes and subsequent animated transition).

This fixes a bug when a window dragged to the top (but not onto another
desktop) would animate its position back to its original position on a
heap, but the scale would remain constant until the end of animation
and only then rapidly jump back to a normally scaled state.
parent 4c6010b0
......@@ -239,6 +239,9 @@ FocusScope {
windowHeap: heap
targetScale: {
if (!activeDragHandler.active) {
return targetScale; // leave it alone, so it won't affect transitions before they start
}
var localPressPosition = activeDragHandler.centroid.scenePressPosition.y - heap.layout.Kirigami.ScenePosition.y;
if (localPressPosition == 0) {
return 0.1
......
......@@ -106,8 +106,8 @@ Item {
target: thumbSource
x: 0
y: 0
width: thumb.width * thumb.targetScale
height: thumb.height * thumb.targetScale
width: thumb.width
height: thumb.height
}
},
State {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment