on xenial help sign in
small fixes
2113423Michael Zanetti
Launcher/FoldingLauncherDelegate.qml+4−4
@@ -24,9 +24,9 @@ LauncherDelegate {
24 angle: {
24 angle: {
25 // First/last items are special
25 // First/last items are special
26 if (index == 0 || index == priv.listView.count-1) {
26 if (index == 0 || index == priv.listView.count-1) {
27− if (priv.overlapWithFoldedArea > 0) {
27+ if (priv.distanceFromEdge < 0) {
28 // proportion equation: distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
28 // proportion equation: distanceFromTopEdge : angle = totalUnfoldedHeight/2 : maxAngle
29− return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (priv.listView.foldingStartHeight)) * priv.orientationFlag
29+ return Math.max(-maxAngle, priv.distanceFromEdge * maxAngle / (priv.foldingAreaHeight)) * priv.orientationFlag
30 }
30 }
31 return 0; // Don't fold first/last item as long as inside the view
31 return 0; // Don't fold first/last item as long as inside the view
32 }
32 }
@@ -74,7 +74,7 @@ LauncherDelegate {
74 if (priv.distanceFromEdge < 0) {
74 if (priv.distanceFromEdge < 0) {
75 // Fade from 1 to 0 while the in 2*foldingAreaHeight
75 // Fade from 1 to 0 while the in 2*foldingAreaHeight
76 // proportion equation: 0.5 : x = -2*foldingAreaHeight : distance
76 // proportion equation: 0.5 : x = -2*foldingAreaHeight : distance
77− return 1 + (priv.distanceFromEdge) / (priv.foldingAreaHeight*2)
77+ return 1 + (priv.distanceFromEdge / (priv.foldingAreaHeight * 2))
78 }
78 }
79 return 1; // Don't make first/last item transparent as long as inside the view
79 return 1; // Don't make first/last item transparent as long as inside the view
80 }
80 }
@@ -82,7 +82,7 @@ LauncherDelegate {
82 // Did we stop folding? Fade out to 0 in 2*foldingAreaHeight
82 // Did we stop folding? Fade out to 0 in 2*foldingAreaHeight
83 if (priv.overlapWithFoldedArea > 0) {
83 if (priv.overlapWithFoldedArea > 0) {
84 // overlap : foldingAreaHeight = opacity : 0.75
84 // overlap : foldingAreaHeight = opacity : 0.75
85− return 0.75 - (priv.overlapWithFoldedArea * 0.75 / (priv.foldingAreaHeight*2));
85+ return 0.75 - (priv.overlapWithFoldedArea * 0.75 / (priv.foldingAreaHeight * 2));
86 }
86 }
87
87
88 // We are overlapping with the folding area, fade out to 0.75 transparency
88 // We are overlapping with the folding area, fade out to 0.75 transparency