on xenial help sign in
sync up animations. Only animate when invoked by right edge, be instant when alt+tabbed
567717dMichael Zanetti
qml/Stages/DesktopSpread.qml+9−2
@@ -80,6 +80,8 @@ FocusScope {
80 anchors.fill: parent
80 anchors.fill: parent
81 visible: false
81 visible: false
82
82
83+ property bool animateIn: false
84+
83 Repeater {
85 Repeater {
84 id: spreadRepeater
86 id: spreadRepeater
85 model: ApplicationManager
87 model: ApplicationManager
@@ -201,7 +203,7 @@ FocusScope {
201 PropertyAnimation {
203 PropertyAnimation {
202 target: spreadDelegate; properties: "x"
204 target: spreadDelegate; properties: "x"
203 from: root.width
205 from: root.width
204− duration: rightEdgePushArea.containsMouse ? UbuntuAnimation.FastDuration :0
206+ duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration :0
205 easing: UbuntuAnimation.StandardEasing
207 easing: UbuntuAnimation.StandardEasing
206 }
208 }
207 }
209 }
@@ -466,7 +468,10 @@ FocusScope {
466 PropertyAction { target: workspaceSelector; property: "visible" }
468 PropertyAction { target: workspaceSelector; property: "visible" }
467 PropertyAction { target: spreadContainer; property: "visible" }
469 PropertyAction { target: spreadContainer; property: "visible" }
468 ParallelAnimation {
470 ParallelAnimation {
471+ UbuntuNumberAnimation {
469− UbuntuNumberAnimation { target: blurLayer; properties: "saturation,blurRadius" }
472+ target: blurLayer; properties: "saturation,blurRadius";
473+ duration: spreadContainer.animateIn ? UbuntuAnimation.FastDuration : 0
474+ }
470 PropertyAction { target: spreadFlickable; property: "visible" }
475 PropertyAction { target: spreadFlickable; property: "visible" }
471 PropertyAction { targets: [currentSelectedLabel,spreadBackground]; property: "visible" }
476 PropertyAction { targets: [currentSelectedLabel,spreadBackground]; property: "visible" }
472 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
477 PropertyAction { target: spreadFlickable; property: "contentX"; value: 0 }
@@ -479,6 +484,7 @@ FocusScope {
479 PropertyAnimation { property: "opacity" }
484 PropertyAnimation { property: "opacity" }
480 ScriptAction { script: { root.focusSelected() } }
485 ScriptAction { script: { root.focusSelected() } }
481 PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: -1 }
486 PropertyAction { target: spreadRepeater; property: "highlightedIndex"; value: -1 }
487+ PropertyAction { target: spreadContainer; property: "animateIn"; value: false }
482 }
488 }
483
489
484 ]
490 ]
@@ -496,6 +502,7 @@ FocusScope {
496 hoverEnabled: true
502 hoverEnabled: true
497 onContainsMouseChanged: {
503 onContainsMouseChanged: {
498 if (containsMouse) {
504 if (containsMouse) {
505+ spreadContainer.animateIn = true;
499 root.state = "altTab";
506 root.state = "altTab";
500 }
507 }
501 }
508 }