@@ -346,6 +346,7 @@ Item {
346 duration: UbuntuAnimation.FastDuration
346 duration: UbuntuAnimation.FastDuration
347// duration: UbuntuAnimation.SleepyDuration
347// duration: UbuntuAnimation.SleepyDuration
349 ScriptAction {
350 ScriptAction {
350 script: {
351 script: {
351 if (spreadView.selectedIndex >= 0) {
352 if (spreadView.selectedIndex >= 0) {
@@ -365,7 +366,7 @@ Item {
367 id: spreadRow
368 id: spreadRow
368− width: ApplicationManager.count * spreadView.tileDistance + (spreadView.width - spreadView.tileDistance) * 1.5 //(spreadView.width * spreadView.positionMarker2) + (spreadView.width - spreadView.tileDistance)
369+ width: ApplicationManager.count * spreadView.tileDistance + (spreadView.width - spreadView.tileDistance) * 1.5
370 x: spreadView.contentX
371 x: spreadView.contentX
@@ -388,6 +389,8 @@ Item {
389 x: index == 0 ? 0 : spreadView.width + (index - 1) * spreadView.tileDistance
390 x: index == 0 ? 0 : spreadView.width + (index - 1) * spreadView.tileDistance
392+ // Each tile has a different progress value running from 0 to 1.
393+ // A progress value of 0 means the tile is at the right edge. 1 means the tile has reched the left edge.
391 progress: {
394 progress: {
392 var tileProgress = (spreadView.shiftedContentX - index * spreadView.tileDistance) / spreadView.width
395 var tileProgress = (spreadView.shiftedContentX - index * spreadView.tileDistance) / spreadView.width
393 // Tile 1 needs to move directly from the beginning...
396 // Tile 1 needs to move directly from the beginning...
@@ -397,6 +400,7 @@ Item {
397 return tileProgress;
400 return tileProgress;
403+ // This mostly is the same as progress, just adds the snapping to stage 1 for tiles 0 and 1
400 animatedProgress: {
404 animatedProgress: {
401 if (spreadView.stage == 0 && index < 2) {
405 if (spreadView.stage == 0 && index < 2) {
402 if (progress < spreadView.positionMarker1) {
406 if (progress < spreadView.positionMarker1) {