on xenial help sign in
tune comments a bit more
07a9822Michael Zanetti
Launcher/LauncherDelegate.qml+5−5
@@ -200,7 +200,7 @@ Item {
200 // First/last items are special
200 // First/last items are special
201 if (index == 0 || index == listView.count-1) {
201 if (index == 0 || index == listView.count-1) {
202 if (priv.distanceFromEdge < 0) {
202 if (priv.distanceFromEdge < 0) {
203− // distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
203+ // proportion equation: distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
204 return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (listView.foldingAreaHeight)) * priv.orientationFlag
204 return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (listView.foldingAreaHeight)) * priv.orientationFlag
205 }
205 }
206 return 0; // Don't fold first/last item as long as inside the view
206 return 0; // Don't fold first/last item as long as inside the view
@@ -208,13 +208,13 @@ Item {
208
208
209 // Are we in the already completely outside the flickable? Fold for the last 5 degrees
209 // Are we in the already completely outside the flickable? Fold for the last 5 degrees
210 if (priv.distanceFromEdge < 0) {
210 if (priv.distanceFromEdge < 0) {
211− // -distanceFromTopEdge : angle = totalUnfoldedHeight : 5
211+ // proportion equation: -distanceFromTopEdge : angle = totalUnfoldedHeight : 5
212 return Math.max(-maxAngle, (priv.distanceFromEdge * 5 / listView.foldingAreaHeight) - (maxAngle-5)) * priv.orientationFlag
212 return Math.max(-maxAngle, (priv.distanceFromEdge * 5 / listView.foldingAreaHeight) - (maxAngle-5)) * priv.orientationFlag
213 }
213 }
214
214
215 // We are overlapping with the folding area, fold the icon to maxAngle - 5 degrees
215 // We are overlapping with the folding area, fold the icon to maxAngle - 5 degrees
216 if (priv.overlapWithFoldingArea > 0) {
216 if (priv.overlapWithFoldingArea > 0) {
217− // overlap: totalHeight = angle : (maxAngle - 5)
217+ // proportion equation: overlap: totalHeight = angle : (maxAngle - 5)
218 return -priv.overlapWithFoldingArea * (maxAngle -5) / listView.foldingAreaHeight * priv.orientationFlag;
218 return -priv.overlapWithFoldingArea * (maxAngle -5) / listView.foldingAreaHeight * priv.orientationFlag;
219 }
219 }
220 return 0;
220 return 0;
@@ -232,13 +232,13 @@ Item {
232
232
233 // Are we already completely outside the flickable? Fade from 0.75 to 0 in 2 items height
233 // Are we already completely outside the flickable? Fade from 0.75 to 0 in 2 items height
234 if (priv.distanceFromEdge < 0) {
234 if (priv.distanceFromEdge < 0) {
235− // -distanceFromEdge : 1-opacity = totalUnfoldedHeight : 0.75
235+ // proportion equation: -distanceFromEdge : 1-opacity = totalUnfoldedHeight : 0.75
236 return 0.75 - (-priv.distanceFromEdge * 0.75 / (priv.totalUnfoldedHeight*2))
236 return 0.75 - (-priv.distanceFromEdge * 0.75 / (priv.totalUnfoldedHeight*2))
237 }
237 }
238
238
239 // We are overlapping with the folding area, fade out to 0.75
239 // We are overlapping with the folding area, fade out to 0.75
240 if (priv.overlapWithFoldingArea > 0) {
240 if (priv.overlapWithFoldingArea > 0) {
241− // overlap : totalHeight = 1-opacity : 0.25
241+ // proportion equation: overlap : totalHeight = 1-opacity : 0.25
242 return 1 - (priv.overlapWithFoldingArea * 0.25 / listView.foldingAreaHeight)
242 return 1 - (priv.overlapWithFoldingArea * 0.25 / listView.foldingAreaHeight)
243 }
243 }
244 return 1;
244 return 1;