@@ -140,7 +140,7 @@ FocusScope {
140 right: parent.right
140 right: parent.right
143− source: getRenderer(model.renderer, model.contentType, model.rendererHint)
143+ source: getRenderer(model.renderer, model.contentType, model.rendererHint, results)
145 onLoaded: {
145 onLoaded: {
146 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
146 if (item.enableHeightBehavior !== undefined && item.enableHeightBehaviorOnNextCreation !== undefined) {
@@ -191,8 +191,8 @@ FocusScope {
192 previewListView.open = true
192 previewListView.open = true
194− scopeView.scope.preview( item.uri, item.icon, item.category, 0, item.mimetype, item.title,
194+ scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title,
195− item.comment, item.dndUri, item.metadata)
195+ item.comment, item.dndUri, item.metadata)
198 onPressAndHold: {
198 onPressAndHold: {
@@ -205,7 +205,7 @@ FocusScope {
205 previewListView.open = true
205 previewListView.open = true
207 var item = target.model.get(index)
207 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,
209 item.comment, item.dndUri, item.metadata)
209 item.comment, item.dndUri, item.metadata)
@@ -303,16 +303,21 @@ FocusScope {
306− function getRenderer(rendererId, contentType, rendererHint) {
306+ function getRenderer(rendererId, contentType, rendererHint, results) {
307 if (rendererId == "default") {
307 if (rendererId == "default") {
308 rendererId = getDefaultRendererId(contentType);
308 rendererId = getDefaultRendererId(contentType);
310+ if (rendererId == "carousel") {
311+ // Selectively disable carousel, 6 is fixed for now, should change on the form factor
312+ if (results.count <= 6)
310 switch (rendererId) {
315 switch (rendererId) {
311 case "carousel": {
316 case "carousel": {
312 switch (contentType) {
317 switch (contentType) {
313− case "music": return "Music/MusicCarouselLoader.qml";
318+ case "music": return "Music/MusicCarousel.qml";
314− case "video": return "Video/VideoCarouselLoader.qml";
319+ case "video": return "Video/VideoCarousel.qml";
315− default: return "Generic/GenericCarouselLoader.qml";
320+ default: return "Generic/GenericCarousel.qml";
318 case "grid": {
323 case "grid": {
@@ -442,27 +447,30 @@ FocusScope {
442 scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
447 scopeView.scope.preview(item.uri, item.icon, item.category, 0, item.mimetype, item.title, item.comment, item.dndUri, item.metadata)
450+ // Adjust contentY in case we need to change to it to show the next row
451+ if (categoryDelegate.rows > 1) {
445− var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
452+ var itemY = categoryView.contentItem.mapFromItem(categoryDelegate.currentItem).y;
447− // Find new contentY and effect.postionPx
454+ // Find new contentY and effect.postionPx
448− var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
455+ var newContentY = itemY - effect.positionPx - categoryDelegate.verticalSpacing;
450− // Make sure the item is not covered by a header. Move the effect split down if necessary
457+ // Make sure the item is not covered by a header. Move the effect split down if necessary
451− var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
458+ var headerHeight = pageHeader.height + categoryView.stickyHeaderHeight;
452− var effectAdjust = Math.max(effect.positionPx, headerHeight);
459+ var effectAdjust = Math.max(effect.positionPx, headerHeight);
454− // Make sure we don't overscroll the listview. If yes, adjust effect position
461+ // Make sure we don't overscroll the listview. If yes, adjust effect position
455− if (newContentY < 0) {
462+ if (newContentY < 0) {
456− effectAdjust += newContentY;
463+ effectAdjust += newContentY;
457− newContentY = 0;
464+ newContentY = 0;
459− if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
466+ if (newContentY > Math.max(0, categoryView.contentHeight - categoryView.height)) {
460− effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
467+ effectAdjust += -(categoryView.contentHeight - categoryView.height) + newContentY
461− newContentY = categoryView.contentHeight - categoryView.height;
468+ newContentY = categoryView.contentHeight - categoryView.height;
464− effect.positionPx = effectAdjust;
471+ effect.positionPx = effectAdjust;
465− categoryView.contentY = newContentY;
472+ categoryView.contentY = newContentY;
468 property bool open: false
476 property bool open: false
@@ -540,7 +548,7 @@ FocusScope {
542 function closePreviewSpinner() {
550 function closePreviewSpinner() {
543− if(item) {
551+ if (item) {
544 item.showProcessingAction = false;
552 item.showProcessingAction = false;