@@ -437,7 +437,7 @@ function sanitizeColor(colorString) {
437 return colorString;
437 return colorString;
440−function cardString(template, components, isCardTool, artShapeStyle) {
440+function cardString(template, components, isCardTool, artShapeStyle, categoryLayout) {
441 var code;
441 var code;
443 var templateInteractive = (template == null ? true : (template["non-interactive"] !== undefined ? !template["non-interactive"] : true)) ? "true" : "false";
443 var templateInteractive = (template == null ? true : (template["non-interactive"] !== undefined ? !template["non-interactive"] : true)) ? "true" : "false";
@@ -943,29 +943,33 @@ function cardString(template, components, isCardTool, artShapeStyle) {
943 code += kTouchdownCode.arg(touchdownAnchors);
943 code += kTouchdownCode.arg(touchdownAnchors);
946+ if (isCardTool || categoryLayout !== "grid") {
946− var implicitHeight = 'implicitHeight: ';
947+ var implicitHeight = 'implicitHeight: ';
947− if (hasSocialActions) {
948+ if (hasSocialActions) {
948− implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
949+ implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
949− } else if (hasSummary) {
950+ } else if (hasSummary) {
950− implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
951+ implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
951− } else if (isAudio) {
952+ } else if (isAudio) {
952− implicitHeight += 'audioButton.height;\n';
953+ implicitHeight += 'audioButton.height;\n';
953− } else if (headerAsOverlay) {
954+ } else if (headerAsOverlay) {
954− implicitHeight += 'artShapeHolder.height;\n';
955+ implicitHeight += 'artShapeHolder.height;\n';
955− } else if (hasHeaderRow) {
956+ } else if (hasHeaderRow) {
956− implicitHeight += 'row.y + row.height + units.gu(1);\n';
957+ implicitHeight += 'row.y + row.height + units.gu(1);\n';
957− } else if (hasMascot) {
958+ } else if (hasMascot) {
958− implicitHeight += 'mascotImage.y + mascotImage.height;\n';
959+ implicitHeight += 'mascotImage.y + mascotImage.height;\n';
959− } else if (hasTitleContainer) {
960+ } else if (hasTitleContainer) {
960− implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
961+ implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
961− } else if (hasAttributes) {
962+ } else if (hasAttributes) {
962− implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
963+ implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
963− } else if (hasSubtitle) {
964+ } else if (hasSubtitle) {
964− implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
965+ implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
965− } else if (hasTitle) {
966+ } else if (hasTitle) {
966− implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
967+ implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
967− } else if (hasArt) {
968+ } else if (hasArt) {
968− implicitHeight += 'artShapeHolder.height;\n';
969+ implicitHeight += 'artShapeHolder.height;\n';
971+ implicitHeight = '';
970 implicitHeight = '';
974 implicitHeight = '';
@@ -976,13 +980,13 @@ function cardString(template, components, isCardTool, artShapeStyle) {
976 return code;
980 return code;
979−function createCardComponent(parent, template, components, isCardTool, artShapeStyle, identifier) {
983+function createCardComponent(parent, template, components, isCardTool, artShapeStyle, categoryLayout, identifier) {
980 var imports = 'import QtQuick 2.4; \n\
984 var imports = 'import QtQuick 2.4; \n\
981 import Ubuntu.Components 1.3; \n\
985 import Ubuntu.Components 1.3; \n\
982 import Ubuntu.Settings.Components 0.1; \n\
986 import Ubuntu.Settings.Components 0.1; \n\
983 import Dash 0.1;\n\
987 import Dash 0.1;\n\
984 import Utils 0.1;\n';
988 import Utils 0.1;\n';
985− var card = cardString(template, components, isCardTool, artShapeStyle);
989+ var card = cardString(template, components, isCardTool, artShapeStyle, categoryLayout);
986 var code = imports + 'Component {\n' + card + '}\n';
990 var code = imports + 'Component {\n' + card + '}\n';