@@ -73,8 +73,8 @@ Rectangle {
73 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
73 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": {"aspect-ratio": 0.5, "summary": undefined }}) }
76− "name": "Title - vertical",
76+ "name": "Title - centered",
77− "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title" } }
77+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": { "field": "title", "align": "center" } } }
80 "name": "Title - horizontal",
80 "name": "Title - horizontal",
@@ -85,8 +85,12 @@ Rectangle {
85 "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "subtitle": "subtitle" } }
85 "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "subtitle": "subtitle" } }
88− "name": "Title, price - horizontal",
88+ "name": "Title, attributes - horizontal",
89− "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "price": "price" } }
89+ "layout": { "template": { "card-layout": "horizontal" }, "components": { "title": "title", "attributes": "attributes" } }
92+ "name": "Title, attributes - centered",
93+ "layout": { "template": { "card-layout": "vertical" }, "components": { "title": "title", "attributes": "attributes" } }
@@ -100,6 +104,7 @@ Rectangle {
103 width: units.gu(38)
108 width: units.gu(38)
104 anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
109 anchors { left: parent.left; top: parent.top; margins: units.gu(1) }
@@ -111,7 +116,7 @@ Rectangle {
113 delegate: Row {
118 delegate: Row {
114− anchors { left: parent.left; right: parent.right; margins: units.gu(3) }
119+ anchors { left: column.left; right: column.right; margins: units.gu(3) }
117 height: units.gu(5)
122 height: units.gu(5)
@@ -315,27 +320,24 @@ Rectangle {
318− function test_card_header_component_alignment_data() {
323+ function test_card_title_alignment_data() {
320− { tag: "Title - vertical", component: "titleLabel", property: "headerAlignment",
321− value: Text.AlignHCenter, index: 11, layout_index: 0 },
325+ { tag: "Title - centered", value: Text.AlignHCenter, index: 11, layout_index: 0 },
322− { tag: "Title - horizontal", component: "titleLabel", property: "headerAlignment",
323− value: Text.AlignLeft, index: 12, layout_index: 0},
326+ { tag: "Title - horizontal", value: Text.AlignLeft, index: 12, layout_index: 0},
324− { tag: "Title, subtitle - vertical", component: "titleLabel", property: "headerAlignment",
325− value: Text.AlignLeft, index: 13, layout_index: 0},
327+ { tag: "Title, subtitle - vertical", value: Text.AlignLeft, index: 13, layout_index: 0},
326− { tag: "Title, price - horizontal", component: "titleLabel", property: "headerAlignment",
327− value: Text.AlignLeft, index: 14, layout_index: 0},
328+ { tag: "Title, attribute - horizontal", value: Text.AlignLeft, index: 14, layout_index: 0},
329+ { tag: "Title, attribute - centered", value: Text.AlignLeft, index: 15, layout_index: 0},
331− function test_card_header_component_alignment(data) {
333+ function test_card_title_alignment(data) {
332 selector.selectedIndex = data.index;
334 selector.selectedIndex = data.index;
333 if (data.hasOwnProperty("layout_index")) {
335 if (data.hasOwnProperty("layout_index")) {
334 layoutSelector.selectedIndex = data.layout_index;
336 layoutSelector.selectedIndex = data.layout_index;
337 if (data.hasOwnProperty("property")) {
339 if (data.hasOwnProperty("property")) {
338− tryCompare(cardTool, data.property, data.value);
340+ tryCompare(cardTool, "titleAlignment", data.value);