on xenial help sign in
cleanup comments
c51562bMichael Zanetti
Launcher/LauncherDelegate.qml+3−5
@@ -24,7 +24,6 @@ Item {
24
24
25 property real angle: 0
25 property real angle: 0
26
26
27− onAngleChanged: if (index == 1) print("onAngleChanged", angle)
28 property bool highlighted: false
27 property bool highlighted: false
29 property real offset: 0
28 property real offset: 0
30 property alias brightness: transformEffect.brightness
29 property alias brightness: transformEffect.brightness
@@ -126,7 +125,7 @@ Item {
126 angle: root.angle * 0.7
125 angle: root.angle * 0.7
127 },
126 },
128 // Because rotating it 3 times moves it more to the front/back, i.e. it gets
127 // Because rotating it 3 times moves it more to the front/back, i.e. it gets
129− // bigger/smaller we need a scale to eliminate that side effect again.
128+ // bigger/smaller and we need a scale to compensate that again.
130 Scale {
129 Scale {
131 xScale: 1 - (Math.abs(angle) / 500)
130 xScale: 1 - (Math.abs(angle) / 500)
132 yScale: 1 - (Math.abs(angle) / 500)
131 yScale: 1 - (Math.abs(angle) / 500)
@@ -175,7 +174,7 @@ Item {
175 PropertyChanges {
174 PropertyChanges {
176 target: root
175 target: root
177
176
178− // This is the offset that keeps the items in the panel
177+ // This is the offset that keeps the items inside the panel
179 offset: {
178 offset: {
180 // First/last items are special
179 // First/last items are special
181 if (index == 0 || index == iconRepeater.count-1) {
180 if (index == 0 || index == iconRepeater.count-1) {
@@ -189,7 +188,6 @@ Item {
189 // Are we already completely outside the flickable? Stop the icon here.
188 // Are we already completely outside the flickable? Stop the icon here.
190 if (priv.distanceFromEdge < -priv.totalUnfoldedHeight) {
189 if (priv.distanceFromEdge < -priv.totalUnfoldedHeight) {
191 return (-priv.distanceFromEdge - (root.height - effectiveHeight)) * priv.orientationFlag;
190 return (-priv.distanceFromEdge - (root.height - effectiveHeight)) * priv.orientationFlag;
192− return (-priv.distanceFromEdge - effectiveHeight) * priv.orientationFlag
193 }
191 }
194
192
195 // We're touching the edge, move slower than the actual flicking speed.
193 // We're touching the edge, move slower than the actual flicking speed.
@@ -233,7 +231,7 @@ Item {
233 // First item is special
231 // First item is special
234 if (index == 0 || index == iconRepeater.count-1) {
232 if (index == 0 || index == iconRepeater.count-1) {
235 if (priv.distanceFromEdge < 0) {
233 if (priv.distanceFromEdge < 0) {
236− // Fade from 1 to 0 in the distance of 2 items height (which is when the next item reaches the edge)
234+ // Fade from 1 to 0 in the distance of 3 * foldingAreaHeight (which is when the next item reaches the edge)
237 return 1.0 - (-priv.distanceFromEdge / (priv.foldingAreaHeight * 3))
235 return 1.0 - (-priv.distanceFromEdge / (priv.foldingAreaHeight * 3))
238 }
236 }
239 return 1; // Don't make first/last item transparent as long as inside the view
237 return 1; // Don't make first/last item transparent as long as inside the view