@@ -429,7 +429,7 @@ function sanitizeColor(colorString) {
429429 return colorString;
430430}
431431
432−function cardString(template, components, isCardTool, artShapeStyle) {
432+function cardString(template, components, isCardTool, artShapeStyle, categoryLayout) {
433433 var code;
434434
435435 var templateInteractive = (template == null ? true : (template["non-interactive"] !== undefined ? !template["non-interactive"] : true)) ? "true" : "false";
@@ -935,29 +935,33 @@ function cardString(template, components, isCardTool, artShapeStyle) {
935935 code += kTouchdownCode.arg(touchdownAnchors);
936936 }
937937
938− var implicitHeight = 'implicitHeight: ';
939− if (hasSocialActions) {
940− implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
941− } else if (hasSummary) {
942− implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
943− } else if (isAudio) {
944− implicitHeight += 'audioButton.height;\n';
945− } else if (headerAsOverlay) {
946− implicitHeight += 'artShapeLoader.height;\n';
947− } else if (hasHeaderRow) {
948− implicitHeight += 'row.y + row.height + units.gu(1);\n';
949− } else if (hasMascot) {
950− implicitHeight += 'mascotImage.y + mascotImage.height;\n';
951− } else if (hasTitleContainer) {
952− implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
953− } else if (hasAttributes) {
954− implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
955− } else if (hasSubtitle) {
956− implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
957− } else if (hasTitle) {
958− implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
959− } else if (hasArt) {
960− implicitHeight += 'artShapeLoader.height;\n';
938+ if (isCardTool || categoryLayout !== "grid") {
939+ var implicitHeight = 'implicitHeight: ';
940+ if (hasSocialActions) {
941+ implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
942+ } else if (hasSummary) {
943+ implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
944+ } else if (isAudio) {
945+ implicitHeight += 'audioButton.height;\n';
946+ } else if (headerAsOverlay) {
947+ implicitHeight += 'artShapeLoader.height;\n';
948+ } else if (hasHeaderRow) {
949+ implicitHeight += 'row.y + row.height + units.gu(1);\n';
950+ } else if (hasMascot) {
951+ implicitHeight += 'mascotImage.y + mascotImage.height;\n';
952+ } else if (hasTitleContainer) {
953+ implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
954+ } else if (hasAttributes) {
955+ implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
956+ } else if (hasSubtitle) {
957+ implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
958+ } else if (hasTitle) {
959+ implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
960+ } else if (hasArt) {
961+ implicitHeight += 'artShapeLoader.height;\n';
962+ } else {
963+ implicitHeight = '';
964+ }
961965 } else {
962966 implicitHeight = '';
963967 }
@@ -968,13 +972,13 @@ function cardString(template, components, isCardTool, artShapeStyle) {
968972 return code;
969973}
970974
971−function createCardComponent(parent, template, components, isCardTool, artShapeStyle, identifier) {
975+function createCardComponent(parent, template, components, isCardTool, artShapeStyle, categoryLayout, identifier) {
972976 var imports = 'import QtQuick 2.4; \n\
973977 import Ubuntu.Components 1.3; \n\
974978 import Ubuntu.Settings.Components 0.1; \n\
975979 import Dash 0.1;\n\
976980 import Utils 0.1;\n';
977− var card = cardString(template, components, isCardTool, artShapeStyle);
981+ var card = cardString(template, components, isCardTool, artShapeStyle, categoryLayout);
978982 var code = imports + 'Component {\n' + card + '}\n';
979983
980984 try {