@@ -100,6 +100,10 @@ Item {
101 QtObject {
101 QtObject {
104+ // The height of the area where icons start getting folded
105+ property int foldingAreaHeight: totalUnfoldedHeight * 0.75
103 property real totalUnfoldedHeight: launcherFlickable.itemSize + launcherColumn.spacing
107 property real totalUnfoldedHeight: launcherFlickable.itemSize + launcherColumn.spacing
104 property real totalEffectiveHeight: effectiveHeight + launcherColumn.spacing
108 property real totalEffectiveHeight: effectiveHeight + launcherColumn.spacing
105 property real distanceFromTopEdge: -(launcherFlickable.contentY - itemsBeforeThis*totalUnfoldedHeight)
109 property real distanceFromTopEdge: -(launcherFlickable.contentY - itemsBeforeThis*totalUnfoldedHeight)
@@ -108,7 +112,7 @@ Item {
108 property real distanceFromEdge: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? distanceFromBottomEdge : distanceFromTopEdge
112 property real distanceFromEdge: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? distanceFromBottomEdge : distanceFromTopEdge
109 property real orientationFlag: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? -1 : 1
113 property real orientationFlag: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? -1 : 1
111− property real overlapWithFoldingArea: totalUnfoldedHeight - distanceFromEdge
115+ property real overlapWithFoldingArea: foldingAreaHeight - distanceFromEdge
@@ -147,7 +151,7 @@ Item {
147 if (index == 0 || index == iconRepeater.count-1) {
151 if (index == 0 || index == iconRepeater.count-1) {
148 if (priv.distanceFromEdge < 0) {
152 if (priv.distanceFromEdge < 0) {
149 // distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
153 // distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
150− return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (priv.totalUnfoldedHeight)) * priv.orientationFlag
154+ return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (priv.foldingAreaHeight)) * priv.orientationFlag
152 return 0; // Don't fold first item as long as inside the view
156 return 0; // Don't fold first item as long as inside the view
@@ -155,13 +159,13 @@ Item {
155 // Are we in the already completely outside the flickable? Fold for the last 5 degrees
159 // Are we in the already completely outside the flickable? Fold for the last 5 degrees
156 if (priv.distanceFromEdge < 0) {
160 if (priv.distanceFromEdge < 0) {
157 // -distanceFromTopEdge : angle = totalUnfoldedHeight : 5
161 // -distanceFromTopEdge : angle = totalUnfoldedHeight : 5
158− return Math.max(-maxAngle, (priv.distanceFromEdge * 5 / priv.totalUnfoldedHeight) - (maxAngle-5)) * priv.orientationFlag
162+ return Math.max(-maxAngle, (priv.distanceFromEdge * 5 / priv.foldingAreaHeight) - (maxAngle-5)) * priv.orientationFlag
161 // We are overlapping with the folding area, fold the icon to maxAngle - 5 degrees
165 // We are overlapping with the folding area, fold the icon to maxAngle - 5 degrees
162 if (priv.overlapWithFoldingArea > 0) {
166 if (priv.overlapWithFoldingArea > 0) {
163 // overlap: totalHeight = angle : (maxAngle - 5)
167 // overlap: totalHeight = angle : (maxAngle - 5)
164− return -priv.overlapWithFoldingArea * (maxAngle -5) / priv.totalUnfoldedHeight * priv.orientationFlag;
168+ return -priv.overlapWithFoldingArea * (maxAngle -5) / priv.foldingAreaHeight * priv.orientationFlag;
@@ -187,7 +191,7 @@ Item {
187 // We are overlapping with the folding area, fade out to 0.75
191 // We are overlapping with the folding area, fade out to 0.75
188 if (priv.overlapWithFoldingArea > 0) {
192 if (priv.overlapWithFoldingArea > 0) {
189 // overlap : totalHeight = 1-opacity : 0.25
193 // overlap : totalHeight = 1-opacity : 0.25
190− return 1 - (priv.overlapWithFoldingArea * 0.25 / priv.totalUnfoldedHeight)
194+ return 1 - (priv.overlapWithFoldingArea * 0.25 / priv.foldingAreaHeight)
192 return 1;
196 return 1;
@@ -204,7 +208,7 @@ Item {
206 if (priv.overlapWithFoldingArea > 0) {
210 if (priv.overlapWithFoldingArea > 0) {
207− return - (priv.overlapWithFoldingArea * 0.3 / priv.totalUnfoldedHeight)
211+ return - (priv.overlapWithFoldingArea * 0.3 / priv.foldingAreaHeight)
209 return 0;
213 return 0;