on xenial help sign in
Maintain the old behaviour a bit more so the app scope doesn't regress
e37ff49Albert Astals Cid
qml/Dash/CardTool.qml+1−1
@@ -145,7 +145,7 @@ Item {
145 readonly property int titleAlignment: {
145 readonly property int titleAlignment: {
146 if (template["card-layout"] === "horizontal"
146 if (template["card-layout"] === "horizontal"
147 || typeof components["title"] !== "object"
147 || typeof components["title"] !== "object"
148− || components["title"]["align"] !== "center") return Text.AlignLeft;
148+ || components["title"]["align"] === "left") return Text.AlignLeft;
149
149
150 var keys = ["mascot", "emblem", "subtitle", "attributes", "summary"];
150 var keys = ["mascot", "emblem", "subtitle", "attributes", "summary"];
151
151
tests/qmltests/Dash/tst_CardTool.qml+5
@@ -346,6 +346,11 @@ Rectangle {
346
346
347 tryCompare(cardTool, "titleAlignment", data.value);
347 tryCompare(cardTool, "titleAlignment", data.value);
348
348
349+ cardTool.components['title'] = { "field": "title" };
350+ cardTool.componentsChanged();
351+
352+ tryCompare(cardTool, "titleAlignment", data.value);
353+
349 cardTool.components['title'] = { "field": "title", "align": "left" };
354 cardTool.components['title'] = { "field": "title", "align": "left" };
350 cardTool.componentsChanged();
355 cardTool.componentsChanged();
351
356