@@ -447,27 +447,30 @@ FocusScope {
447447 scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
448448 }
449449
450− var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y; //XXX not working fine with carousel, shift in y after first
450+ // Adjust contentY in case we need to change to it to show the next row
451+ if (categoryDelegate.rows > 1) {
452+ var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
451453
452− // Find new contentY and effect.postionPx
453− var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
454+ // Find new contentY and effect.postionPx
455+ var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
454456
455− // Make sure the item is not covered by a header. Move the effect split down if necessary
456− var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
457− var effectAdjust = Math.max(effect.positionPx, headerHeight);
457+ // Make sure the item is not covered by a header. Move the effect split down if necessary
458+ var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
459+ var effectAdjust = Math.max(effect.positionPx, headerHeight);
458460
459− // Make sure we don't overscroll the listview. If yes, adjust effect position
460− if (newContentY < 0) {
461− effectAdjust += newContentY;
462− newContentY = 0;
463− }
464− if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
465− effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
466− newContentY = categoryView.contentHeight - categoryView.height;
467− }
461+ // Make sure we don't overscroll the listview. If yes, adjust effect position
462+ if (newContentY < 0) {
463+ effectAdjust += newContentY;
464+ newContentY = 0;
465+ }
466+ if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
467+ effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
468+ newContentY = categoryView.contentHeight - categoryView.height;
469+ }
468470
469− effect.positionPx = effectAdjust;
470− categoryView.contentY = newContentY;
471+ effect.positionPx = effectAdjust;
472+ categoryView.contentY = newContentY;
473+ }
471474 }
472475
473476 property bool open: false