on xenial help sign in
Make cardWidth and cardHeight real

If they are var the properties depending on them get reevaluated even if they don't change

commitd6e0280fccbdf44dc6ab0f95fa11d723dceb5ac8 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 28 Oct 2015, 12:03 (11 years ago) parentfe871d7
1 file changed+3−2
qml/Dash/CardTool.qml+3−2
qml/Dash/CardTool.qml+3−2
@@ -80,7 +80,8 @@ Item {
8080
8181 If undefined, should use implicit width of the actual card.
8282 */
83− property var cardWidth: {
83+ property real cardWidth: {
84+ console.log("Evaluating cardWidth of", cardTool);
8485 switch (categoryLayout) {
8586 case "grid":
8687 case "vertical-journal":
@@ -115,7 +116,7 @@ Item {
115116
116117 If undefined, should use implicit height of the actual card.
117118 */
118− readonly property var cardHeight: {
119+ readonly property real cardHeight: {
119120 switch (categoryLayout) {
120121 case "journal":
121122 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);