@@ -130,9 +130,10 @@ ScopeView {
130 target: rendererLoader.item
130 target: rendererLoader.item
131 onClicked: {
131 onClicked: {
132 // Prepare the preview in case activate() triggers a preview only
132 // Prepare the preview in case activate() triggers a preview only
133− effect.positionPx = mapToItem(categoryView, 0, itemY).y
133+ effect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + sectionHeaderHeight);
134 previewListView.categoryId = categoryId
134 previewListView.categoryId = categoryId
135 previewListView.categoryDelegate = rendererLoader.item
135 previewListView.categoryDelegate = rendererLoader.item
136+ previewListView.sectionHeaderHeight = sectionHeaderHeight;
136 previewListView.model = model;
137 previewListView.model = model;
137 previewListView.init = true;
138 previewListView.init = true;
138 previewListView.currentIndex = index;
139 previewListView.currentIndex = index;
@@ -151,9 +152,10 @@ ScopeView {
153 onPressAndHold: {
154 onPressAndHold: {
154− effect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + units.gu(5));
155+ effect.positionPx = Math.max(mapToItem(categoryView, 0, itemY).y, pageHeader.height + sectionHeaderHeight);
155 previewListView.categoryId = categoryId
156 previewListView.categoryId = categoryId
156 previewListView.categoryDelegate = rendererLoader.item
157 previewListView.categoryDelegate = rendererLoader.item
158+ previewListView.sectionHeaderHeight = sectionHeaderHeight;
157 previewListView.model = model;
159 previewListView.model = model;
158 previewListView.init = true;
160 previewListView.init = true;
159 previewListView.currentIndex = index;
161 previewListView.currentIndex = index;
@@ -375,6 +377,7 @@ ScopeView {
375 // To be set before opening the preview
377 // To be set before opening the preview
376 property string categoryId: ""
378 property string categoryId: ""
377 property var categoryDelegate
379 property var categoryDelegate
380+ property int sectionHeaderHeight
379 // because the ListView is built asynchronous, setting the
382 // because the ListView is built asynchronous, setting the
380 // currentIndex directly won't work. We need to refresh it
383 // currentIndex directly won't work. We need to refresh it
@@ -402,7 +405,7 @@ ScopeView {
402 var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
405 var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
404 // Make sure the item is not covered by a header. Move the effect split down if necessary
407 // Make sure the item is not covered by a header. Move the effect split down if necessary
405− var headerHeight = pageHeader.height + units.gu(5); // sectionHeader's height
408+ var headerHeight = pageHeader.height + previewListView.sectionHeaderHeight;
406 var effectAdjust = Math.max(effect.positionPx, headerHeight);
409 var effectAdjust = Math.max(effect.positionPx, headerHeight);
408 // Make sure we don't overscroll the listview. If yes, adjust effect position
411 // Make sure we don't overscroll the listview. If yes, adjust effect position