@@ -5,6 +5,8 @@ QtObject {
55 id: root
66
77 function desktopX(index, totalWidth, flickableX) {
8+ // Uncomment this to keep linear x movement
9+ // return (totalWidth / 5) * index - flickableX;
810 var distance = totalWidth / 5;
911 var minX = 0;
1012 var startX = index * distance;
@@ -20,20 +22,20 @@ QtObject {
2022 return x;
2123 }
2224
23− function desktopY(totalHeight, itemHeight) {
24− return (totalHeight - itemHeight) / 2;
25+ function desktopY(sceneHeight, itemHeight) {
26+ return sceneHeight - itemHeight - (sceneHeight * 0.1);
2527 }
2628
2729 function desktopAngle(index, flickableX) {
28− var startProgress = 0;
29− var endProgress = 1;
30− var startValue = index * 5;
31− var endValue = 0;
32− var progress = 1.0 * flickableX / startValue;
33− print("progress for tile", index, ":", startProgress, endProgress, startValue, endValue, progress)
34− var angle = easingAnimation(startProgress, endProgress, startValue, endValue, progress);
35− print("resulting angle:", angle)
36− return angle;
30+ return 20;
31+ }
32+
33+ function desktopScale(sceneHeight, itemHeight) {
34+ var maxHeight = sceneHeight / 2;
35+ if (itemHeight > maxHeight) {
36+ return maxHeight / itemHeight
37+ }
38+ return 1;
3739 }
3840
3941 function easingAnimation(startProgress, endProgress, startValue, endValue, progress) {