@@ -179,7 +179,6 @@ Item {
179179 id: spreadDragArea
180180 direction: Direction.Leftwards
181181
182− //enabled: root.available
183182 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
184183 width: root.dragAreaWidth
185184
@@ -191,7 +190,6 @@ Item {
191190 if (!dragging && !priv.waitingForScreenshot) {
192191 priv.requestNewScreenshot();
193192 spreadView.stage = 0;
194− attachedToView = true;
195193 spreadView.contentX = -spreadView.shift;
196194 }
197195 if (dragging && !priv.waitingForScreenshot && attachedToView) {
@@ -204,6 +202,12 @@ Item {
204202 gesturePoints.push(touchX)
205203 }
206204
205+ onStatusChanged: {
206+ if (status == DirectionalDragArea.Recognized) {
207+ attachedToView = true;
208+ }
209+ }
210+
207211 onDraggingChanged: {
208212 var oneWayFlick = true;
209213 var smallestX = spreadDragArea.width;
@@ -241,7 +245,7 @@ Item {
241245 Flickable {
242246 id: spreadView
243247 anchors.fill: parent
244− visible: spreadDragArea.status == DirectionalDragArea.Recognized || stage > 0 || snapAnimation.running
248+ visible: spreadDragArea.status == DirectionalDragArea.Recognized || stage > 1 || snapAnimation.running
245249 contentWidth: spreadRow.width - shift
246250 contentX: -shift
247251
@@ -271,9 +275,7 @@ Item {
271275
272276 property int selectedIndex: -1
273277
274− onStageChanged: print("*******stage cahnged", stage)
275−
276− onContentXChanged: {
278+ onShiftedContentXChanged: {
277279 switch (stage) {
278280 case 0:
279281 if (shiftedContentX > width * positionMarker2) {
@@ -294,13 +296,10 @@ Item {
294296 snapAnimation.targetContentX = -shift;
295297 snapAnimation.start();
296298 } else if (shiftedContentX < positionMarker2 * width) {
297− print("selecting tile 1")
298299 snapTo(1)
299300 } else if (shiftedContentX < positionMarker3 * width) {
300− print("snappoing to stage1")
301301 snapTo(1)
302302 } else if (stage < 2){
303− print("snappoing to stage2")
304303 // Add 1 pixel to make sure we definitely hit positionMarker4 even with rounding errors of the animation.
305304 snapAnimation.targetContentX = width * positionMarker4 + 1 - shift;
306305 snapAnimation.start();
@@ -321,14 +320,12 @@ Item {
321320 target: spreadView
322321 property: "contentX"
323322 to: snapAnimation.targetContentX
324− duration: UbuntuAnimation.FastDuration
325−// duration: UbuntuAnimation.SleepyDuration
323+// duration: UbuntuAnimation.FastDuration
324+ duration: UbuntuAnimation.SleepyDuration
326325 }
327326 ScriptAction {
328327 script: {
329−// print("animation finished: stage", spreadView.stage, "contentX", spreadView.contentX, "focused app", ApplicationManager.get(0).appId, ApplicationManager.get(1).appId)
330328 if (spreadView.selectedIndex >= 0) {
331− print("switching to app", snapAnimation.toIndex, ApplicationManager.get(spreadView.selectedIndex).name)
332329 ApplicationManager.focusApplication(ApplicationManager.get(spreadView.selectedIndex).appId);
333330 spreadView.selectedIndex = -1
334331 spreadView.stage = 0;
@@ -339,7 +336,6 @@ Item {
339336 spreadView.stage = 0;
340337 spreadView.contentX = -spreadView.shift;
341338 }
342− print("snapping done. stage:", spreadView.stage)
343339 }
344340 }
345341 }
@@ -358,8 +354,8 @@ Item {
358354 id: appDelegate
359355 startAngle: 45
360356 endAngle: 5
361− startScale: 1.2
362− endScale: 0.6
357+ startScale: 1.1
358+ endScale: 0.7
363359 startDistance: spreadView.tileDistance
364360 endDistance: units.gu(.5)
365361 width: spreadView.width
@@ -383,7 +379,7 @@ Item {
383379 if (spreadView.stage == 0 && index < 2) {
384380 if (progress < spreadView.positionMarker1) {
385381 return progress;
386− } else if (progress < spreadView.positionMarker1 + .05){
382+ } else if (progress < spreadView.positionMarker1 + snappingCurve.period){
387383 return spreadView.positionMarker1 + snappingCurve.value * 3
388384 } else {
389385 return spreadView.positionMarker2
@@ -395,7 +391,7 @@ Item {
395391 EasingCurve {
396392 id: snappingCurve
397393 type: EasingCurve.OutQuad
398− period: 0.05//spreadView.positionMarker2 - spreadView.positionMarker1
394+ period: 0.05
399395 progress: appDelegate.progress - spreadView.positionMarker1
400396 }
401397