@@ -20,7 +20,6 @@ Item {
20 // State information propagated to the outside
20 // State information propagated to the outside
21 readonly property bool painting: mainScreenshotImage.visible || fadeInScreenshotImage.visible || appSplash.visible
21 readonly property bool painting: mainScreenshotImage.visible || fadeInScreenshotImage.visible || appSplash.visible
22 onPaintingChanged: print("**********************+ painting changed", painting)
22 onPaintingChanged: print("**********************+ painting changed", painting)
23− onShownChanged: print("*********************** shown changed", shown)
25 onMovingChanged: {
24 onMovingChanged: {
26 if (moving) {
25 if (moving) {
@@ -38,7 +37,6 @@ Item {
40 onFocusedApplicationIdChanged: {
39 onFocusedApplicationIdChanged: {
41− print("foooooooooooooo")
42 if (ApplicationManager.focusedApplicationId.length > 0) {
40 if (ApplicationManager.focusedApplicationId.length > 0) {
43 if (priv.secondApplicationStarting || priv.applicationStarting) {
41 if (priv.secondApplicationStarting || priv.applicationStarting) {
44 appSplashTimer.start();
42 appSplashTimer.start();
@@ -67,7 +65,7 @@ Item {
68 property string focusedAppId: ApplicationManager.focusedApplicationId
66 property string focusedAppId: ApplicationManager.focusedApplicationId
69 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
67 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
70− property url focusedScreenshot: focusedApplication.screenshot
68+ property url focusedScreenshot: focusedApplication ? focusedApplication.screenshot : ""
72 property bool waitingForScreenshot: false
70 property bool waitingForScreenshot: false
@@ -76,10 +74,7 @@ Item {
77 property string newFocusedAppId
75 property string newFocusedAppId
79− onFocusedAppIdChanged: print("focusedappidchanged")
81 onFocusedScreenshotChanged: {
77 onFocusedScreenshotChanged: {
82− print("focusedscreenshotchanged")
83 if (root.moving && priv.waitingForScreenshot) {
78 if (root.moving && priv.waitingForScreenshot) {
84 mainScreenshotImage.anchors.leftMargin = 0;
79 mainScreenshotImage.anchors.leftMargin = 0;
85 mainScreenshotImage.src = ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).screenshot;
80 mainScreenshotImage.src = ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).screenshot;
@@ -91,7 +86,6 @@ Item {
93 function requestNewScreenshot() {
88 function requestNewScreenshot() {
94− print("requesting new screenshot", focusedAppId, focusedScreenshot, focusedApplication, focusedApplication.screenshot)
95 waitingForScreenshot = true;
89 waitingForScreenshot = true;
96 ApplicationManager.updateScreenshot(ApplicationManager.focusedApplicationId);
90 ApplicationManager.updateScreenshot(ApplicationManager.focusedApplicationId);
@@ -104,6 +98,13 @@ Item {
101+ // FIXME: the signal connection seems to get lost with the fake application manager.
102+ // Check with Qt 5.2, see if we can remove this Connections object
104+ target: priv.focusedApplication
105+ onScreenshotChanged: priv.focusedScreenshot = priv.focusedApplication.screenshot
108 id: grantFocusTimer
109 id: grantFocusTimer
109 // Delay the actual switch to be covered by the animation for sure.
110 // Delay the actual switch to be covered by the animation for sure.
@@ -188,7 +189,7 @@ Item {
189 EdgeDragArea {
190 EdgeDragArea {
190 id: coverFlipDragArea
191 id: coverFlipDragArea
191− direction: Direction.Rightwards
192+ direction: Direction.Leftwards
193 //enabled: root.available
194 //enabled: root.available
194 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
195 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
@@ -319,6 +320,7 @@ Item {
319 target: coverFlickable
320 target: coverFlickable
320 properties: "contentX"
321 properties: "contentX"
321 to: snapAnimation.targetContentX
322 to: snapAnimation.targetContentX
323+ duration: UbuntuAnimation.SnapDuration
323 ScriptAction {
325 ScriptAction {
324 script: {
326 script: {
@@ -514,7 +516,7 @@ Item {
515 EasingCurve {
517 EasingCurve {
516 id: scaleEasing
518 id: scaleEasing
517− type: EasingCurve.OutQuad
519+ type: EasingCurve.Linear
518 period: coverFlip.maxScale - coverFlip.minScale
520 period: coverFlip.maxScale - coverFlip.minScale
519 progress: appImage.translatedProgress
521 progress: appImage.translatedProgress
@@ -546,8 +548,11 @@ Item {
546 SequentialAnimation {
548 SequentialAnimation {
547 id: switchToAppAnimation
549 id: switchToAppAnimation
548 property int targetContentX
550 property int targetContentX
549− ParallelAnimation {
551+ UbuntuNumberAnimation {
552+ target: coverFlickable;
553+ property: "contentX";
550− UbuntuNumberAnimation { target: coverFlickable; property: "contentX"; to: switchToAppAnimation.targetContentX }
554+ to: switchToAppAnimation.targetContentX;
555+ duration: UbuntuAnimation.SnapDuration
552 ScriptAction {
557 ScriptAction {
553 script: {
558 script: {
@@ -562,9 +567,4 @@ Item {
566− anchors.fill: parent