@@ -100,7 +100,12 @@ Rectangle {
101 "name": "Art, title - vertical, fitted",
101 "name": "Art, title - vertical, fitted",
102 "layout": { "components": Helpers.update(JSON.parse(root.fullMapping), { "art": { "fill-mode": "fit" } }) }
102 "layout": { "components": Helpers.update(JSON.parse(root.fullMapping), { "art": { "fill-mode": "fit" } }) }
105+ "name": "Art, header, summary - horizontal",
106+ "layout": { "template": { "card-layout": "horizontal" },
107+ "components": JSON.parse(fullMapping) }
@@ -231,6 +236,7 @@ Rectangle {
231 { tag: "Small", width: units.gu(12), size: "small", index: 0 },
236 { tag: "Small", width: units.gu(12), size: "small", index: 0 },
232 { tag: "Large", width: units.gu(38), size: "large", index: 0 },
237 { tag: "Large", width: units.gu(38), size: "large", index: 0 },
233 { tag: "Wide", width: units.gu(18.5), aspect: 0.5, index: 0 },
238 { tag: "Wide", width: units.gu(18.5), aspect: 0.5, index: 0 },
239+ { tag: "Horizontal", width: units.gu(38), index: 5 },
@@ -263,6 +269,9 @@ Rectangle {
263 { tag: "Large", width: units.gu(38), index: 2 },
269 { tag: "Large", width: units.gu(38), index: 2 },
264 { tag: "Wide", height: units.gu(19), size: "large", index: 3 },
270 { tag: "Wide", height: units.gu(19), size: "large", index: 3 },
265 { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 },
271 { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 },
272+ { tag: "VerticalWidth", width: function() { return header.width }, index: 0 },
273+ { tag: "HorizontalHeight", height: function() { return header.height }, index: 5 },
274+ { tag: "HorizontalWidth", width: function() { return header.x }, index: 5 },
@@ -280,16 +289,49 @@ Rectangle {
282 if (data.hasOwnProperty("width")) {
291 if (data.hasOwnProperty("width")) {
292+ if (typeof data.width === "function") {
293+ tryCompareFunction(function() { return art.width === data.width() }, true);
283− tryCompare(art, "width", data.width);
294+ } else tryCompare(art, "width", data.width);
286 if (data.hasOwnProperty("height")) {
297 if (data.hasOwnProperty("height")) {
298+ if (typeof data.height === "function") {
299+ tryCompareFunction(function() { return art.height === data.height() }, true);
287− tryCompare(art, "height", data.height);
300+ } else tryCompare(art, "height", data.height);
290 if (data.hasOwnProperty("fill")) {
303 if (data.hasOwnProperty("fill")) {
291 tryCompare(artImage, "fillMode", data.fill);
304 tryCompare(artImage, "fillMode", data.fill);
308+ function test_art_layout_data() {
310+ { tag: "Vertical", left: function() { return 0 }, index: 0},
311+ { tag: "Horizontal", left: function() { return art.width }, index: 5 }
315+ function test_art_layout(data) {
316+ selector.selectedIndex = data.index;
318+ tryCompare(testCase.header, "x", data.left());
321+ function test_header_layout_data() {
323+ { tag: "Vertical", top: function() { return art.y + art.height },
324+ left: function() { return art.x }, index: 0 },
325+ { tag: "Horizontal", top: function() { return art.y },
326+ left: function() { return art.x + art.width }, index: 5 }
330+ function test_header_layout(data) {
331+ selector.selectedIndex = data.index;
333+ tryCompareFunction(function() { return testCase.header.y === data.top() }, true);
334+ tryCompareFunction(function() { return testCase.header.x === data.left() }, true);