on xenial help sign in
Misc previewlist fixes

* Position the arrow correctly (the delegate we're pointing to doesn't have a center property anymore) * Fix the open effect when there's only little content on the list

commit1aff3e15ea838be4506f20e0cbf21550231d399a authorAlbert Astals <albert.astals@canonical.com> dateFri 14 Feb 2014, 10:17 (13 years ago) parent1a212a6
1 file changed+2−2
qml/Dash/PreviewListView.qml+2−2
qml/Dash/PreviewListView.qml+2−2
@@ -42,7 +42,7 @@ Item {
4242 top: previewListView.bottom
4343 left: parent.left
4444 leftMargin: previewListView.categoryDelegate !== undefined && previewListView.categoryDelegate.currentItem ?
45− previewListView.categoryDelegate.currentItem.center + (-width + margins) / 2 : 0
45+ previewListView.categoryDelegate.currentItem.x + previewListView.categoryDelegate.currentItem.width / 2 + (-width + margins) / 2 : 0
4646
4747 Behavior on leftMargin {
4848 SmoothedAnimation {
@@ -116,7 +116,7 @@ Item {
116116 effectAdjust += newContentY;
117117 newContentY = 0;
118118 }
119− if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
119+ if ((categoryView.contentHeight > categoryView.height) && (newContentY > categoryView.contentHeight - categoryView.height)) {
120120 effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
121121 newContentY = categoryView.contentHeight - categoryView.height;
122122 }