on xenial help sign in
take listView's originY into account
commitf60e86fe34956bd8ef175176c3b423247209bbe5 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 25 Jun 2013, 16:29 (13 years ago) parent719b008
1 file changed+4−2
Launcher/LauncherDelegate.qml+4−2
Launcher/LauncherDelegate.qml+4−2
@@ -157,8 +157,10 @@ Item {
157157
158158 property real totalUnfoldedHeight: listView.itemSize + listView.spacing
159159 property real totalEffectiveHeight: effectiveHeight + listView.spacing
160− property real distanceFromTopEdge: -(listView.contentY + listView.topMargin - index*totalUnfoldedHeight)
161− property real distanceFromBottomEdge: listView.height - listView.bottomMargin - (y+height) + listView.contentY
160+ property real effectiveContentY: listView.contentY - listView.originY
161+ property real effectiveY: y - listView.originY
162+ property real distanceFromTopEdge: -(effectiveContentY + listView.topMargin - index*totalUnfoldedHeight)
163+ property real distanceFromBottomEdge: listView.height - listView.bottomMargin - (effectiveY+height) + effectiveContentY
162164
163165 property real distanceFromEdge: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? distanceFromBottomEdge : distanceFromTopEdge
164166 property real orientationFlag: Math.abs(distanceFromBottomEdge) < Math.abs(distanceFromTopEdge) ? -1 : 1