@@ -98,6 +98,13 @@ Item {
99 clip: true
99 clip: true
101+ // We have 3 view "widths"
105+ readonly property bool isWideView: viewWidth >= units.gu(70)
106+ readonly property bool isNarrowView: viewWidth <= units.gu(45)
102 type:real \brief Width to be enforced on the card in this configuration.
109 type:real \brief Width to be enforced on the card in this configuration.
@@ -105,8 +112,8 @@ Item {
106 readonly property real cardWidth: {
113 readonly property real cardWidth: {
107 if (isAppLikeScopeAppCategory) {
114 if (isAppLikeScopeAppCategory) {
108− if (viewWidth > units.gu(45)) {
115+ if (!isNarrowView) {
109− if (viewWidth >= units.gu(70)) {
116+ if (isWideView) {
110 return units.gu(11);
117 return units.gu(11);
112 return units.gu(10);
119 return units.gu(10);
@@ -123,16 +130,16 @@ Item {
123 if (template["card-layout"] === "horizontal") size = "large";
130 if (template["card-layout"] === "horizontal") size = "large";
124 switch (size) {
131 switch (size) {
125 case "small": {
132 case "small": {
126− if (viewWidth <= units.gu(45)) return units.gu(12);
133+ if (isNarrowView) return units.gu(12);
127 else return units.gu(14);
134 else return units.gu(14);
129 case "large": {
136 case "large": {
130− if (viewWidth >= units.gu(70)) return units.gu(42);
137+ if (isWideView) return units.gu(42);
131 else return viewWidth - units.gu(2);
138 else return viewWidth - units.gu(2);
134− if (viewWidth <= units.gu(45)) return units.gu(18);
141+ if (isNarrowView) return units.gu(18);
135− else if (viewWidth >= units.gu(70)) return units.gu(20);
142+ else if (isWideView) return units.gu(20);
136 else return units.gu(23);
143 else return units.gu(23);
137 case "carousel":
144 case "carousel":
138 case "horizontal-list":
145 case "horizontal-list":