on xenial help sign in
fix some transitions again
commit660cc951dce90bd570a92558cccfd5c68fb722e3 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 3 Aug 2016, 12:01 (10 years ago) parentf337152
2 files changed+11−5
qml/Stages/DesktopStage.qml+10−4 qml/Stages/Spread/StagedRightEdgeMaths.qml+1−1
qml/Stages/DesktopStage.qml+10−4
@@ -731,9 +731,15 @@ AbstractStage {
731731 }
732732
733733 function playFocusAnimation() {
734− if (state == "stagedrightedge" || state == "sidestagedrightedge") {
735− rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
736− rightEdgeFocusAnimation.start()
734+ if (state == "sidestagedrightedge") {
735+ // TODO: Can we drop this if and find something that always works?
736+ if (root.mode == "staged") {
737+ rightEdgeFocusAnimation.targetX = 0
738+ rightEdgeFocusAnimation.start()
739+ } else if (root.mode == "stagedWithSideStage") {
740+ rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
741+ rightEdgeFocusAnimation.start()
742+ }
737743 } else {
738744 focusAnimation.start()
739745 }
@@ -753,7 +759,7 @@ AbstractStage {
753759 ParallelAnimation {
754760 id: rightEdgeFocusAnimation
755761 property int targetX: 0
756− UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: targetX; duration: priv.animationDuration }
762+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: rightEdgeFocusAnimation.targetX; duration: priv.animationDuration }
757763 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
758764 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
759765 onStopped: appDelegate.focus = true
qml/Stages/Spread/StagedRightEdgeMaths.qml+1−1
@@ -30,7 +30,7 @@ QtObject {
3030 // Output
3131
3232 readonly property real scaleToPreviewProgress: {
33− print("scaleProg:", progress < breakPoint ? 0 : MathUtils.linearAnimation(breakPoint, 1.0, 0.0, 1.0, progress))
33+// print("scaleProg:", progress < breakPoint ? 0 : MathUtils.linearAnimation(breakPoint, 1.0, 0.0, 1.0, progress))
3434 return progress < breakPoint ? 0 : MathUtils.linearAnimation(0.5, 1.0, 0.0, 1.0, progress)
3535 }
3636 readonly property int animatedWidth: {