@@ -5,6 +5,8 @@ QtObject {
7 function desktopX(index, totalWidth, flickableX) {
7 function desktopX(index, totalWidth, flickableX) {
8+ // Uncomment this to keep linear x movement
9+ // return (totalWidth / 5) * index - flickableX;
8 var distance = totalWidth / 5;
10 var distance = totalWidth / 5;
9 var minX = 0;
11 var minX = 0;
10 var startX = index * distance;
12 var startX = index * distance;
@@ -20,20 +22,20 @@ QtObject {
23− function desktopY(totalHeight, itemHeight) {
25+ function desktopY(sceneHeight, itemHeight) {
24− return (totalHeight - itemHeight) / 2;
26+ return sceneHeight - itemHeight - (sceneHeight * 0.1);
27 function desktopAngle(index, flickableX) {
29 function desktopAngle(index, flickableX) {
28− var startProgress = 0;
30+ return 20;
29− var endProgress = 1;
31+ }
30− var startValue = index * 5;
32+
31− var endValue = 0;
33+ function desktopScale(sceneHeight, itemHeight) {
32− var progress = 1.0 * flickableX / startValue;
34+ var maxHeight = sceneHeight / 2;
33− print("progress for tile", index, ":", startProgress, endProgress, startValue, endValue, progress)
35+ if (itemHeight > maxHeight) {
34− var angle = easingAnimation(startProgress, endProgress, startValue, endValue, progress);
36+ return maxHeight / itemHeight
35− print("resulting angle:", angle)
37+ }
36− return angle;
38+ return 1;
39 function easingAnimation(startProgress, endProgress, startValue, endValue, progress) {
41 function easingAnimation(startProgress, endProgress, startValue, endValue, progress) {