@@ -140,7 +140,7 @@ FocusScope {
140140 right: parent.right
141141 }
142142
143− source: getRenderer(model.renderer, model.contentType, model.rendererHint)
143+ source: getRenderer(model.renderer, model.contentType, model.rendererHint, results)
144144
145145 onLoaded: {
146146 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
@@ -191,8 +191,8 @@ FocusScope {
191191 } else {
192192 previewListView.open = true
193193
194− scopeView.scope.preview( item.uri, item.icon, item.category, 0, item.mimetype, item.title,
195− item.comment, item.dndUri, item.metadata)
194+ scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
195+ item.comment, item.dndUri, item.metadata)
196196 }
197197 }
198198 onPressAndHold: {
@@ -205,7 +205,7 @@ FocusScope {
205205 previewListView.open = true
206206
207207 var item = target.model.get(index)
208− scopeView.scope.preview( item.uri, item.icon, item.category, 0, item.mimetype, item.title,
208+ scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
209209 item.comment, item.dndUri, item.metadata)
210210 }
211211 }
@@ -303,16 +303,21 @@ FocusScope {
303303 }
304304 }
305305
306− function getRenderer(rendererId, contentType, rendererHint) {
306+ function getRenderer(rendererId, contentType, rendererHint, results) {
307307 if (rendererId == "default") {
308308 rendererId = getDefaultRendererId(contentType);
309309 }
310+ if (rendererId == "carousel") {
311+ // Selectively disable carousel, 6 is fixed for now, should change on the form factor
312+ if (results.count <= 6)
313+ rendererId = "grid"
314+ }
310315 switch (rendererId) {
311316 case "carousel": {
312317 switch (contentType) {
313− case "music": return "Music/MusicCarouselLoader.qml";
314− case "video": return "Video/VideoCarouselLoader.qml";
315− default: return "Generic/GenericCarouselLoader.qml";
318+ case "music": return "Music/MusicCarousel.qml";
319+ case "video": return "Video/VideoCarousel.qml";
320+ default: return "Generic/GenericCarousel.qml";
316321 }
317322 }
318323 case "grid": {
@@ -442,27 +447,30 @@ FocusScope {
442447 scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
443448 }
444449
445− var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
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;
446453
447− // Find new contentY and effect.postionPx
448− var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
454+ // Find new contentY and effect.postionPx
455+ var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
449456
450− // Make sure the item is not covered by a header. Move the effect split down if necessary
451− var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
452− 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);
453460
454− // Make sure we don't overscroll the listview. If yes, adjust effect position
455− if (newContentY < 0) {
456− effectAdjust += newContentY;
457− newContentY = 0;
458− }
459− if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
460− effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
461− newContentY = categoryView.contentHeight - categoryView.height;
462− }
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+ }
463470
464− effect.positionPx = effectAdjust;
465− categoryView.contentY = newContentY;
471+ effect.positionPx = effectAdjust;
472+ categoryView.contentY = newContentY;
473+ }
466474 }
467475
468476 property bool open: false
@@ -540,7 +548,7 @@ FocusScope {
540548 }
541549
542550 function closePreviewSpinner() {
543− if(item) {
551+ if (item) {
544552 item.showProcessingAction = false;
545553 }
546554 }