Maintain the old behaviour a bit more so the app scope doesn't regress
commite37ff49d9aeb5102cd379ca249f44aec5fb2036b
authorAlbert Astals Cid <albert.astals@canonical.com>
dateTue 1 Sep 2015, 10:38 (11 years ago)
parentc6cf928
qml/Dash/CardTool.qml+1−1
@@ -145,7 +145,7 @@ Item {
145145 readonly property int titleAlignment: {
146146 if (template["card-layout"] === "horizontal"
147147 || typeof components["title"] !== "object"
148− || components["title"]["align"] !== "center") return Text.AlignLeft;
148+ || components["title"]["align"] === "left") return Text.AlignLeft;
149149
150150 var keys = ["mascot", "emblem", "subtitle", "attributes", "summary"];
151151
tests/qmltests/Dash/tst_CardTool.qml+5
@@ -346,6 +346,11 @@ Rectangle {
346346
347347 tryCompare(cardTool, "titleAlignment", data.value);
348348
349+ cardTool.components['title'] = { "field": "title" };
350+ cardTool.componentsChanged();
351+
352+ tryCompare(cardTool, "titleAlignment", data.value);
353+
349354 cardTool.components['title'] = { "field": "title", "align": "left" };
350355 cardTool.componentsChanged();
351356