Merge lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard into lp:unity8

Proposed by Albert Astals Cid
Status: Superseded
Proposed branch: lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/recoverArtIfChanges
Diff against target: 1451 lines (+265/-404)
27 files modified
plugins/Dash/CardAttributes.qml (+26/-18)
plugins/Dash/CardCreator.js (+124/-100)
qml/Dash/CardCarousel.qml (+1/-0)
tests/plugins/Dash/cardcreator/1.res (+11/-27)
tests/plugins/Dash/cardcreator/1.res.cardcreator (+7/-24)
tests/plugins/Dash/cardcreator/10.res (+4/-4)
tests/plugins/Dash/cardcreator/10.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/11.res (+12/-28)
tests/plugins/Dash/cardcreator/11.res.cardcreator (+6/-23)
tests/plugins/Dash/cardcreator/12.res (+11/-27)
tests/plugins/Dash/cardcreator/12.res.cardcreator (+7/-24)
tests/plugins/Dash/cardcreator/2.res (+4/-4)
tests/plugins/Dash/cardcreator/2.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/3.res (+10/-26)
tests/plugins/Dash/cardcreator/3.res.cardcreator (+6/-23)
tests/plugins/Dash/cardcreator/4.res (+4/-4)
tests/plugins/Dash/cardcreator/4.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/5.res (+11/-27)
tests/plugins/Dash/cardcreator/5.res.cardcreator (+7/-24)
tests/plugins/Dash/cardcreator/6.res (+2/-2)
tests/plugins/Dash/cardcreator/6.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/7.res (+4/-4)
tests/plugins/Dash/cardcreator/7.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/8.res (+4/-4)
tests/plugins/Dash/cardcreator/8.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/9.res (+4/-4)
tests/plugins/Dash/cardcreator/9.res.cardcreator (+0/-1)
To merge this branch: bzr merge lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Unity Team Pending
Review via email: mp+295338@code.launchpad.net

This proposal supersedes a proposal from 2016-05-20.

This proposal has been superseded by a proposal from 2016-05-23.

Commit message

Split artShape code for cardTool card and regular card

The cardTool card never has a fixedArtShapeSize so it does not need all the code to take it into account

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2218
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1267/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1709
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1659
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1659
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1652/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1652/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1652/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1652
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1652/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1267/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2221
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1271/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/805
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/805
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1713
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1663
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1663
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1656/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1656
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1656/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1271/rebuild

review: Needs Fixing (continuous-integration)
2219. By Albert Astals Cid

Merge lp:~aacid/unity8/optimize_card_attribute_creation

2220. By Albert Astals Cid

Merge

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/CardAttributes.qml'
2--- plugins/Dash/CardAttributes.qml 2015-07-15 15:13:18 +0000
3+++ plugins/Dash/CardAttributes.qml 2016-05-20 16:16:18 +0000
4@@ -43,28 +43,36 @@
5 Layout.column: index % grid.columns
6 Layout.row: index / grid.columns
7 Layout.columnSpan: index == repeater.count - 1 && grid.columns == 3 && column == 1 ? 2 : 1
8- Layout.maximumWidth: Math.max(icon.width, label.x + label.implicitWidth)
9+ Layout.maximumWidth: Math.max(iconLoader.width, labelLoader.x + labelLoader.implicitWidth)
10 Layout.fillWidth: true
11 height: units.gu(2)
12- Icon {
13- id: icon
14- height: units.gu(2)
15- // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
16- width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
17- source: "icon" in modelData && modelData["icon"] || ""
18- color: grid.color
19+ Loader {
20+ id: iconLoader
21+ readonly property string source: "icon" in modelData && modelData["icon"] || ""
22+ active: source !== ""
23+ sourceComponent: Icon {
24+ height: units.gu(2)
25+ // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
26+ width: implicitWidth > 0 && implicitHeight > 0 ? (implicitWidth / implicitHeight * height) : implicitWidth
27+ source: parent.source
28+ color: grid.color
29+ }
30 }
31- Label {
32- id: label
33+ Loader {
34+ id: labelLoader
35 width: parent.width - x
36- anchors.verticalCenter: parent.verticalCenter
37- text: "value" in modelData && modelData["value"] || "";
38- elide: Text.ElideRight
39- maximumLineCount: 1
40- font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
41- fontSize: "small"
42- font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
43- color: grid.color
44+ readonly property string value: "value" in modelData && modelData["value"] || ""
45+ active: value !== ""
46+ sourceComponent: Label {
47+ anchors.verticalCenter: parent.verticalCenter
48+ text: parent.value
49+ elide: Text.ElideRight
50+ maximumLineCount: 1
51+ font.weight: "style" in modelData && modelData["style"] === "highlighted" ? Font.Bold : Font.Light
52+ fontSize: "small"
53+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
54+ color: grid.color
55+ }
56 }
57 }
58 }
59
60=== modified file 'plugins/Dash/CardCreator.js'
61--- plugins/Dash/CardCreator.js 2016-05-20 16:16:18 +0000
62+++ plugins/Dash/CardCreator.js 2016-05-20 16:16:18 +0000
63@@ -74,57 +74,78 @@
64 aspect: UbuntuShape.DropShadow; \n\
65 }';
66
67-// %1 is used as anchors of artShapeHolder
68-// %2 is used as image width
69-// %3 is used as image height
70-// %4 is whether the image should be visible
71-// %5 is used as aspect ratio fallback
72-// %6 is whether the loader should be asynchronous or not
73-// %7 is the shape code we want to use
74-// %8 is injected as code to artImage
75-// %9 is used as image fallback
76-var kArtShapeHolderCode = 'Item { \n\
77- id: artShapeHolder; \n\
78- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
79- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
80- anchors { %1 } \n\
81- Loader { \n\
82- id: artShapeLoader; \n\
83- objectName: "artShapeLoader"; \n\
84- readonly property string cardArt: cardData && cardData["art"] || %9; \n\
85- onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
86- active: cardArt != ""; \n\
87- asynchronous: %6; \n\
88- visible: status == Loader.Ready; \n\
89- sourceComponent: Item { \n\
90- id: artShape; \n\
91- objectName: "artShape"; \n\
92- visible: image.status == Image.Ready; \n\
93- readonly property alias image: artImage; \n\
94- %7 \n\
95- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
96- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : %5; \n\
97- Component.onCompleted: { updateWidthHeightBindings(); } \n\
98- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\
99- function updateWidthHeightBindings() { \n\
100- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\
101- width = root.fixedArtShapeSize.width; \n\
102- height = root.fixedArtShapeSize.height; \n\
103- } else { \n\
104- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); \n\
105- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); \n\
106- } \n\
107- } \n\
108- CroppedImageMinimumSourceSize { \n\
109- id: artImage; \n\
110- objectName: "artImage"; \n\
111- source: artShapeLoader.cardArt; \n\
112- asynchronous: %6; \n\
113- visible: %4; \n\
114- width: %2; \n\
115- height: %3; \n\
116- %8 \n\
117- } \n\
118+// %1 is used as anchors of artShapeLoader
119+// %2 is used as image width
120+// %3 is used as image height
121+// %4 is whether the image should be visible
122+// %5 is whether the loader should be asynchronous or not
123+// %6 is the shape code we want to use
124+// %7 is injected as code to artImage
125+// %8 is used as image fallback
126+var kArtShapeLoaderCode = 'Loader { \n\
127+ id: artShapeLoader; \n\
128+ anchors { %1 } \n\
129+ objectName: "artShapeLoader"; \n\
130+ readonly property string cardArt: cardData && cardData["art"] || %8; \n\
131+ onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
132+ active: cardArt != ""; \n\
133+ asynchronous: %5; \n\
134+ visible: status == Loader.Ready; \n\
135+ sourceComponent: Item { \n\
136+ id: artShape; \n\
137+ objectName: "artShape"; \n\
138+ visible: image.status == Image.Ready; \n\
139+ readonly property alias image: artImage; \n\
140+ %6 \n\
141+ width: root.fixedArtShapeSize.width; \n\
142+ height: root.fixedArtShapeSize.height; \n\
143+ CroppedImageMinimumSourceSize { \n\
144+ id: artImage; \n\
145+ objectName: "artImage"; \n\
146+ source: artShapeLoader.cardArt; \n\
147+ asynchronous: %5; \n\
148+ visible: %4; \n\
149+ width: %2; \n\
150+ height: %3; \n\
151+ %7 \n\
152+ } \n\
153+ } \n\
154+ }\n';
155+
156+// %1 is used as anchors of artShapeLoader
157+// %2 is used as image width
158+// %3 is used as image height
159+// %4 is whether the image should be visible
160+// %5 is whether the loader should be asynchronous or not
161+// %6 is the shape code we want to use
162+// %7 is injected as code to artImage
163+// %8 is used as image fallback
164+var kArtShapeLoaderCodeCardToolCard = 'Loader { \n\
165+ id: artShapeLoader; \n\
166+ anchors { %1 } \n\
167+ objectName: "artShapeLoader"; \n\
168+ readonly property string cardArt: cardData && cardData["art"] || %8; \n\
169+ onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
170+ active: cardArt != ""; \n\
171+ asynchronous: %5; \n\
172+ visible: status == Loader.Ready; \n\
173+ sourceComponent: Item { \n\
174+ id: artShape; \n\
175+ objectName: "artShape"; \n\
176+ visible: image.status == Image.Ready; \n\
177+ readonly property alias image: artImage; \n\
178+ %6 \n\
179+ width: image.status !== Image.Ready ? 0 : image.width; \n\
180+ height: image.status !== Image.Ready ? 0 : image.height; \n\
181+ CroppedImageMinimumSourceSize { \n\
182+ id: artImage; \n\
183+ objectName: "artImage"; \n\
184+ source: artShapeLoader.cardArt; \n\
185+ asynchronous: %5; \n\
186+ visible: %4; \n\
187+ width: %2; \n\
188+ height: %3; \n\
189+ %7 \n\
190 } \n\
191 } \n\
192 }\n';
193@@ -182,7 +203,7 @@
194 var kOverlayLoaderCode = 'Loader { \n\
195 id: overlayLoader; \n\
196 readonly property real overlayHeight: %2 + units.gu(2); \n\
197- anchors.fill: artShapeHolder; \n\
198+ anchors.fill: artShapeLoader; \n\
199 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
200 asynchronous: %1; \n\
201 visible: showHeader && status == Loader.Ready; \n\
202@@ -416,15 +437,16 @@
203 property string backgroundShapeStyle: "inset"; \n\
204 property real fontScale: 1.0; \n\
205 property var scopeStyle: null; \n\
206- %2\
207- property size fixedArtShapeSize: Qt.size(-1, -1); \n\
208 readonly property string title: cardData && cardData["title"] || ""; \n\
209 property bool showHeader: true; \n\
210 implicitWidth: childrenRect.width; \n\
211 enabled: %1; \n\
212 \n'.arg(templateInteractive);
213
214- code = code.arg(isCardTool ? "" : "property int fixedHeaderHeight: -1; \n");
215+ if (!isCardTool) {
216+ code += "property int fixedHeaderHeight: -1; \n\
217+ property size fixedArtShapeSize: Qt.size(-1, -1); \n";
218+ }
219
220 var hasArt = components["art"] && components["art"]["field"] || false;
221 var hasSummary = components["summary"] || false;
222@@ -483,65 +505,71 @@
223 if (hasArt) {
224 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
225
226+ var artShapeAspect;
227+ if (isCardTool) {
228+ var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
229+ if (isNaN(artShapeAspect)) {
230+ artShapeAspect = 1;
231+ }
232+ } else {
233+ artShapeAspect = "(root.fixedArtShapeSize.width / root.fixedArtShapeSize.height)";
234+ }
235+
236 var widthCode, heightCode;
237 var artAnchors;
238 if (isHorizontal) {
239 artAnchors = 'left: parent.left';
240 if (hasMascot || hasTitle) {
241- widthCode = 'height * artShape.aspect'
242+ widthCode = 'height * ' + artShapeAspect;
243 heightCode = 'headerHeight + 2 * units.gu(1)';
244 } else {
245 // This side of the else is a bit silly, who wants an horizontal layout without mascot and title?
246 // So we define a "random" height of the image height + 2 gu for the margins
247- widthCode = 'height * artShape.aspect'
248+ widthCode = 'height * ' + artShapeAspect
249 heightCode = 'units.gu(7.625)';
250 }
251 } else {
252 artAnchors = 'horizontalCenter: parent.horizontalCenter;';
253 widthCode = 'root.width'
254- heightCode = 'width / artShape.aspect';
255+ heightCode = 'width / ' + artShapeAspect;
256 }
257
258- var aspectRatio = components["art"] && components["art"]["aspect-ratio"] || 1;
259- if (isNaN(aspectRatio)) {
260- aspectRatio = 1;
261- }
262 var fallback = !isCardTool && components["art"] && components["art"]["fallback"] || "";
263 fallback = encodeURI(fallback);
264 var fallbackStatusCode = "";
265 var fallbackURICode = '""';
266 if (fallback !== "") {
267- // fallbackStatusCode has %9 in it because we want to substitute it for fallbackURICode
268- // which in kArtShapeHolderCode is %9
269- fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %9;';
270+ // fallbackStatusCode has %8 in it because we want to substitute it for fallbackURICode
271+ // which in kArtShapeLoaderCode is %8
272+ fallbackStatusCode += 'onStatusChanged: if (status === Image.Error) source = %8;';
273 fallbackURICode = 'decodeURI("%1")'.arg(fallback);
274 }
275- var artShapeHolderShapeCode;
276+ var artShapeLoaderShapeCode;
277 if (!isConciergeMode) {
278 if (artShapeStyle === "icon") {
279- artShapeHolderShapeCode = kArtProportionalShapeCode;
280+ artShapeLoaderShapeCode = kArtProportionalShapeCode;
281 } else {
282- var artShapeHolderShapeAspect;
283+ var artShapeLoaderShapeAspect;
284 switch (artShapeStyle) {
285- case "inset": artShapeHolderShapeAspect = "UbuntuShape.Inset"; break;
286- case "shadow": artShapeHolderShapeAspect = "UbuntuShape.DropShadow"; break;
287+ case "inset": artShapeLoaderShapeAspect = "UbuntuShape.Inset"; break;
288+ case "shadow": artShapeLoaderShapeAspect = "UbuntuShape.DropShadow"; break;
289 default:
290- case "flat": artShapeHolderShapeAspect = "UbuntuShape.Flat"; break;
291+ case "flat": artShapeLoaderShapeAspect = "UbuntuShape.Flat"; break;
292 }
293- artShapeHolderShapeCode = kArtUbuntuShapeCode.arg(artShapeHolderShapeAspect);
294+ artShapeLoaderShapeCode = kArtUbuntuShapeCode.arg(artShapeLoaderShapeAspect);
295 }
296 } else {
297- artShapeHolderShapeCode = "";
298+ artShapeLoaderShapeCode = "";
299 }
300- code += kArtShapeHolderCode.arg(artAnchors)
301- .arg(widthCode)
302- .arg(heightCode)
303- .arg(isConciergeMode ? "true" : "false")
304- .arg(aspectRatio)
305- .arg(asynchronous)
306- .arg(artShapeHolderShapeCode)
307- .arg(fallbackStatusCode)
308- .arg(fallbackURICode);
309+ var artShapeLoaderCode = isCardTool ? kArtShapeLoaderCodeCardToolCard : kArtShapeLoaderCode;
310+ code += artShapeLoaderCode.arg(artAnchors)
311+ .arg(widthCode)
312+ .arg(heightCode)
313+ .arg(isConciergeMode ? "true" : "false")
314+ .arg(asynchronous)
315+ .arg(artShapeLoaderShapeCode)
316+ .arg(fallbackStatusCode)
317+ .arg(fallbackURICode);
318 } else {
319 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
320 }
321@@ -553,15 +581,15 @@
322
323 var headerVerticalAnchors;
324 if (headerAsOverlay) {
325- headerVerticalAnchors = 'bottom: artShapeHolder.bottom; \n\
326+ headerVerticalAnchors = 'bottom: artShapeLoader.bottom; \n\
327 bottomMargin: units.gu(1);\n';
328 } else {
329 if (hasArt) {
330 if (isHorizontal) {
331- headerVerticalAnchors = 'top: artShapeHolder.top; \n\
332+ headerVerticalAnchors = 'top: artShapeLoader.top; \n\
333 topMargin: units.gu(1);\n';
334 } else {
335- headerVerticalAnchors = 'top: artShapeHolder.bottom; \n\
336+ headerVerticalAnchors = 'top: artShapeLoader.bottom; \n\
337 topMargin: units.gu(1);\n';
338 }
339 } else {
340@@ -573,7 +601,7 @@
341 var headerLeftAnchor;
342 var headerLeftAnchorHasMargin = false;
343 if (isHorizontal && hasArt) {
344- headerLeftAnchor = 'left: artShapeHolder.right; \n\
345+ headerLeftAnchor = 'left: artShapeLoader.right; \n\
346 leftMargin: units.gu(1);\n';
347 headerLeftAnchorHasMargin = true;
348 } else if (isHorizontal && isAudio) {
349@@ -827,7 +855,7 @@
350 var audioButtonWidth;
351 var audioButtonHeight;
352 if (hasArt) {
353- audioButtonAnchorsFill = 'artShapeHolder';
354+ audioButtonAnchorsFill = 'artShapeLoader';
355 audioButtonWidth = 'undefined';
356 audioButtonHeight = 'undefined';
357 } else {
358@@ -841,15 +869,15 @@
359
360 if (hasSummary) {
361 var summaryTopAnchor;
362- if (isHorizontal && hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
363- else if (headerAsOverlay && hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
364+ if (isHorizontal && hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
365+ else if (headerAsOverlay && hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
366 else if (hasHeaderRow) summaryTopAnchor = 'row.bottom';
367 else if (hasTitleContainer) summaryTopAnchor = 'headerTitleContainer.bottom';
368 else if (hasMascot) summaryTopAnchor = 'mascotImage.bottom';
369 else if (hasAttributes) summaryTopAnchor = 'attributesRow.bottom';
370 else if (hasSubtitle) summaryTopAnchor = 'subtitleLabel.bottom';
371 else if (hasTitle) summaryTopAnchor = 'titleLabel.bottom';
372- else if (hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
373+ else if (hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
374 else summaryTopAnchor = 'parent.top';
375
376 var summaryColor;
377@@ -864,24 +892,20 @@
378 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(summaryColor);
379 }
380
381-// <<<<<<< TREE
382-// if (artShapeStyle != "shadow" && artShapeStyle != "icon") {
383-// var touchdownAnchors;
384-// =======
385 if (hasSocialActions) {
386 var socialAnchors;
387 var socialTopAnchor;
388
389 if (hasSummary) socialTopAnchor = 'summary.bottom;';
390- else if (isHorizontal && hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
391- else if (headerAsOverlay && hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
392+ else if (isHorizontal && hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
393+ else if (headerAsOverlay && hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
394 else if (hasHeaderRow) socialTopAnchor = 'row.bottom;';
395 else if (hasTitleContainer) socialTopAnchor = 'headerTitleContainer.bottom;';
396 else if (hasMascot) socialTopAnchor = 'mascotImage.bottom;';
397 else if (hasAttributes) socialTopAnchor = 'attributesRow.bottom;';
398 else if (hasSubtitle) socialTopAnchor = 'subtitleLabel.bottom;';
399 else if (hasTitle) socialTopAnchor = 'titleLabel.bottom;';
400- else if (hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
401+ else if (hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
402 else socialTopAnchor = 'parent.top';
403
404 socialAnchors = 'top: ' + socialTopAnchor + ' left: parent.left; right: parent.right; topMargin: units.gu(1);'
405@@ -901,7 +925,7 @@
406 if (hasBackground) {
407 touchdownAnchors = 'fill: backgroundLoader';
408 } else if (touchdownOnArtShape) {
409- touchdownAnchors = 'fill: artShapeHolder';
410+ touchdownAnchors = 'fill: artShapeLoader';
411 } else {
412 touchdownAnchors = 'fill: root'
413 }
414@@ -916,7 +940,7 @@
415 } else if (isAudio) {
416 implicitHeight += 'audioButton.height;\n';
417 } else if (headerAsOverlay) {
418- implicitHeight += 'artShapeHolder.height;\n';
419+ implicitHeight += 'artShapeLoader.height;\n';
420 } else if (hasHeaderRow) {
421 implicitHeight += 'row.y + row.height + units.gu(1);\n';
422 } else if (hasMascot) {
423@@ -930,7 +954,7 @@
424 } else if (hasTitle) {
425 implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
426 } else if (hasArt) {
427- implicitHeight += 'artShapeHolder.height;\n';
428+ implicitHeight += 'artShapeLoader.height;\n';
429 } else {
430 implicitHeight = '';
431 }
432
433=== modified file 'qml/Dash/CardCarousel.qml'
434--- qml/Dash/CardCarousel.qml 2016-05-20 16:16:18 +0000
435+++ qml/Dash/CardCarousel.qml 2016-05-20 16:16:18 +0000
436@@ -62,6 +62,7 @@
437 asynchronous: true
438 onLoaded: {
439 item.fixedHeaderHeight = Qt.binding(function() { return carousel.headerHeight; });
440+ item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
441 item.height = Qt.binding(function() { return cardTool.cardHeight; });
442 item.cardData = Qt.binding(function() { return model; });
443 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
444
445=== modified file 'tests/plugins/Dash/cardcreator/1.res'
446--- tests/plugins/Dash/cardcreator/1.res 2016-05-20 16:16:18 +0000
447+++ tests/plugins/Dash/cardcreator/1.res 2016-05-20 16:16:18 +0000
448@@ -4,21 +4,17 @@
449 property string backgroundShapeStyle: "inset";
450 property real fontScale: 1.0;
451 property var scopeStyle: null;
452+ readonly property string title: cardData && cardData["title"] || "";
453+ property bool showHeader: true;
454+ implicitWidth: childrenRect.width;
455+ enabled: true;
456 property int fixedHeaderHeight: -1;
457 property size fixedArtShapeSize: Qt.size(-1, -1);
458- readonly property string title: cardData && cardData["title"] || "";
459- property bool showHeader: true;
460- implicitWidth: childrenRect.width;
461- enabled: true;
462 signal action(var actionId);
463 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
464-Item {
465- id: artShapeHolder;
466- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
467- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
468- anchors { horizontalCenter: parent.horizontalCenter; }
469- Loader {
470+Loader {
471 id: artShapeLoader;
472+ anchors { horizontalCenter: parent.horizontalCenter; }
473 objectName: "artShapeLoader";
474 readonly property string cardArt: cardData && cardData["art"] || "";
475 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
476@@ -37,19 +33,8 @@
477 radius: "medium";
478 aspect: UbuntuShape.Inset;
479 }
480- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
481- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1.6;
482- Component.onCompleted: { updateWidthHeightBindings(); }
483- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
484- function updateWidthHeightBindings() {
485- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
486- width = root.fixedArtShapeSize.width;
487- height = root.fixedArtShapeSize.height;
488- } else {
489- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
490- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
491- }
492- }
493+ width: root.fixedArtShapeSize.width;
494+ height: root.fixedArtShapeSize.height;
495 CroppedImageMinimumSourceSize {
496 id: artImage;
497 objectName: "artImage";
498@@ -57,18 +42,17 @@
499 asynchronous: true;
500 visible: false;
501 width: root.width;
502- height: width / artShape.aspect;
503+ height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
504 }
505 }
506 }
507- }
508 readonly property int headerHeight: titleLabel.height;
509 Label {
510 id: titleLabel;
511 objectName: "titleLabel";
512 anchors { right: parent.right;
513 left: parent.left;
514- top: artShapeHolder.bottom;
515+ top: artShapeLoader.bottom;
516 topMargin: units.gu(1);
517 }
518 elide: Text.ElideRight;
519@@ -86,7 +70,7 @@
520 UbuntuShape {
521 id: touchdown;
522 objectName: "touchdown";
523- anchors { fill: artShapeHolder }
524+ anchors { fill: artShapeLoader }
525 visible: root.pressed;
526 radius: "medium";
527 borderSource: "radius_pressed.sci"
528
529=== modified file 'tests/plugins/Dash/cardcreator/1.res.cardcreator'
530--- tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-20 16:16:18 +0000
531+++ tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-20 16:16:18 +0000
532@@ -4,20 +4,15 @@
533 property string backgroundShapeStyle: "inset";
534 property real fontScale: 1.0;
535 property var scopeStyle: null;
536- property size fixedArtShapeSize: Qt.size(-1, -1);
537 readonly property string title: cardData && cardData["title"] || "";
538 property bool showHeader: true;
539 implicitWidth: childrenRect.width;
540 enabled: true;
541 signal action(var actionId);
542 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
543-Item {
544- id: artShapeHolder;
545- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
546- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
547- anchors { horizontalCenter: parent.horizontalCenter; }
548- Loader {
549+Loader {
550 id: artShapeLoader;
551+ anchors { horizontalCenter: parent.horizontalCenter; }
552 objectName: "artShapeLoader";
553 readonly property string cardArt: cardData && cardData["art"] || "";
554 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
555@@ -36,19 +31,8 @@
556 radius: "medium";
557 aspect: UbuntuShape.Inset;
558 }
559- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
560- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1.6;
561- Component.onCompleted: { updateWidthHeightBindings(); }
562- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
563- function updateWidthHeightBindings() {
564- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
565- width = root.fixedArtShapeSize.width;
566- height = root.fixedArtShapeSize.height;
567- } else {
568- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
569- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
570- }
571- }
572+ width: image.status !== Image.Ready ? 0 : image.width;
573+ height: image.status !== Image.Ready ? 0 : image.height;
574 CroppedImageMinimumSourceSize {
575 id: artImage;
576 objectName: "artImage";
577@@ -56,10 +40,9 @@
578 asynchronous: false;
579 visible: false;
580 width: root.width;
581- height: width / artShape.aspect;
582+ height: width / 1.6;
583 }
584 }
585- }
586 }
587 readonly property int headerHeight: titleLabel.height;
588 Label {
589@@ -67,7 +50,7 @@
590 objectName: "titleLabel";
591 anchors { right: parent.right;
592 left: parent.left;
593- top: artShapeHolder.bottom;
594+ top: artShapeLoader.bottom;
595 topMargin: units.gu(1);
596 }
597 elide: Text.ElideRight;
598@@ -85,7 +68,7 @@
599 UbuntuShape {
600 id: touchdown;
601 objectName: "touchdown";
602- anchors { fill: artShapeHolder }
603+ anchors { fill: artShapeLoader }
604 visible: root.pressed;
605 radius: "medium";
606 borderSource: "radius_pressed.sci"
607
608=== modified file 'tests/plugins/Dash/cardcreator/10.res'
609--- tests/plugins/Dash/cardcreator/10.res 2016-05-20 16:16:18 +0000
610+++ tests/plugins/Dash/cardcreator/10.res 2016-05-20 16:16:18 +0000
611@@ -4,12 +4,12 @@
612 property string backgroundShapeStyle: "inset";
613 property real fontScale: 1.0;
614 property var scopeStyle: null;
615+ readonly property string title: cardData && cardData["title"] || "";
616+ property bool showHeader: true;
617+ implicitWidth: childrenRect.width;
618+ enabled: true;
619 property int fixedHeaderHeight: -1;
620 property size fixedArtShapeSize: Qt.size(-1, -1);
621- readonly property string title: cardData && cardData["title"] || "";
622- property bool showHeader: true;
623- implicitWidth: childrenRect.width;
624- enabled: true;
625 signal action(var actionId);
626 Loader {
627 id: backgroundLoader;
628
629=== modified file 'tests/plugins/Dash/cardcreator/10.res.cardcreator'
630--- tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-05-20 16:16:18 +0000
631+++ tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-05-20 16:16:18 +0000
632@@ -4,7 +4,6 @@
633 property string backgroundShapeStyle: "inset";
634 property real fontScale: 1.0;
635 property var scopeStyle: null;
636- property size fixedArtShapeSize: Qt.size(-1, -1);
637 readonly property string title: cardData && cardData["title"] || "";
638 property bool showHeader: true;
639 implicitWidth: childrenRect.width;
640
641=== modified file 'tests/plugins/Dash/cardcreator/11.res'
642--- tests/plugins/Dash/cardcreator/11.res 2016-05-20 16:16:18 +0000
643+++ tests/plugins/Dash/cardcreator/11.res 2016-05-20 16:16:18 +0000
644@@ -4,12 +4,12 @@
645 property string backgroundShapeStyle: "inset";
646 property real fontScale: 1.0;
647 property var scopeStyle: null;
648+ readonly property string title: cardData && cardData["title"] || "";
649+ property bool showHeader: true;
650+ implicitWidth: childrenRect.width;
651+ enabled: true;
652 property int fixedHeaderHeight: -1;
653 property size fixedArtShapeSize: Qt.size(-1, -1);
654- readonly property string title: cardData && cardData["title"] || "";
655- property bool showHeader: true;
656- implicitWidth: childrenRect.width;
657- enabled: true;
658 signal action(var actionId);
659 Loader {
660 id: backgroundLoader;
661@@ -50,13 +50,9 @@
662 }
663 }
664 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
665-Item {
666- id: artShapeHolder;
667- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
668- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
669- anchors { horizontalCenter: parent.horizontalCenter; }
670- Loader {
671+Loader {
672 id: artShapeLoader;
673+ anchors { horizontalCenter: parent.horizontalCenter; }
674 objectName: "artShapeLoader";
675 readonly property string cardArt: cardData && cardData["art"] || decodeURI("%5C");
676 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
677@@ -75,31 +71,19 @@
678 radius: "medium";
679 aspect: UbuntuShape.Flat;
680 }
681- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
682- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
683- Component.onCompleted: { updateWidthHeightBindings(); }
684- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
685- function updateWidthHeightBindings() {
686- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
687- width = root.fixedArtShapeSize.width;
688- height = root.fixedArtShapeSize.height;
689- } else {
690- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
691- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
692- }
693- }
694- CroppedImageMinimumSourceSize {
695+ width: root.fixedArtShapeSize.width;
696+ height: root.fixedArtShapeSize.height;
697+ CroppedImageMinimumSourceSize {
698 id: artImage;
699 objectName: "artImage";
700 source: artShapeLoader.cardArt;
701 asynchronous: true;
702 visible: false;
703 width: root.width;
704- height: width / artShape.aspect;
705+ height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
706 onStatusChanged: if (status === Image.Error) source = decodeURI("%5C");
707 }
708- }
709- }
710+ }
711 }
712 readonly property int headerHeight: row.height;
713 Row {
714@@ -108,7 +92,7 @@
715 property real margins: units.gu(1);
716 spacing: margins;
717 height: root.fixedHeaderHeight;
718- anchors { top: artShapeHolder.bottom;
719+ anchors { top: artShapeLoader.bottom;
720 topMargin: units.gu(1);
721 left: parent.left;
722 }
723
724=== modified file 'tests/plugins/Dash/cardcreator/11.res.cardcreator'
725--- tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-20 16:16:18 +0000
726+++ tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-20 16:16:18 +0000
727@@ -4,7 +4,6 @@
728 property string backgroundShapeStyle: "inset";
729 property real fontScale: 1.0;
730 property var scopeStyle: null;
731- property size fixedArtShapeSize: Qt.size(-1, -1);
732 readonly property string title: cardData && cardData["title"] || "";
733 property bool showHeader: true;
734 implicitWidth: childrenRect.width;
735@@ -49,13 +48,9 @@
736 }
737 }
738 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
739-Item {
740- id: artShapeHolder;
741- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
742- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
743- anchors { horizontalCenter: parent.horizontalCenter; }
744- Loader {
745+Loader {
746 id: artShapeLoader;
747+ anchors { horizontalCenter: parent.horizontalCenter; }
748 objectName: "artShapeLoader";
749 readonly property string cardArt: cardData && cardData["art"] || "";
750 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
751@@ -74,19 +69,8 @@
752 radius: "medium";
753 aspect: UbuntuShape.Flat;
754 }
755- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
756- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
757- Component.onCompleted: { updateWidthHeightBindings(); }
758- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
759- function updateWidthHeightBindings() {
760- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
761- width = root.fixedArtShapeSize.width;
762- height = root.fixedArtShapeSize.height;
763- } else {
764- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
765- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
766- }
767- }
768+ width: image.status !== Image.Ready ? 0 : image.width;
769+ height: image.status !== Image.Ready ? 0 : image.height;
770 CroppedImageMinimumSourceSize {
771 id: artImage;
772 objectName: "artImage";
773@@ -94,10 +78,9 @@
774 asynchronous: false;
775 visible: false;
776 width: root.width;
777- height: width / artShape.aspect;
778+ height: width / 1;
779 }
780 }
781- }
782 }
783 readonly property int headerHeight: row.height;
784 Row {
785@@ -105,7 +88,7 @@
786 objectName: "outerRow";
787 property real margins: units.gu(1);
788 spacing: margins;
789- anchors { top: artShapeHolder.bottom;
790+ anchors { top: artShapeLoader.bottom;
791 topMargin: units.gu(1);
792 left: parent.left;
793 }
794
795=== modified file 'tests/plugins/Dash/cardcreator/12.res'
796--- tests/plugins/Dash/cardcreator/12.res 2016-05-20 16:16:18 +0000
797+++ tests/plugins/Dash/cardcreator/12.res 2016-05-20 16:16:18 +0000
798@@ -4,21 +4,17 @@
799 property string backgroundShapeStyle: "inset";
800 property real fontScale: 1.0;
801 property var scopeStyle: null;
802+ readonly property string title: cardData && cardData["title"] || "";
803+ property bool showHeader: true;
804+ implicitWidth: childrenRect.width;
805+ enabled: true;
806 property int fixedHeaderHeight: -1;
807 property size fixedArtShapeSize: Qt.size(-1, -1);
808- readonly property string title: cardData && cardData["title"] || "";
809- property bool showHeader: true;
810- implicitWidth: childrenRect.width;
811- enabled: true;
812 signal action(var actionId);
813 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
814-Item {
815- id: artShapeHolder;
816- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
817- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
818- anchors { horizontalCenter: parent.horizontalCenter; }
819- Loader {
820+Loader {
821 id: artShapeLoader;
822+ anchors { horizontalCenter: parent.horizontalCenter; }
823 objectName: "artShapeLoader";
824 readonly property string cardArt: cardData && cardData["art"] || "";
825 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
826@@ -37,19 +33,8 @@
827 radius: "medium";
828 aspect: UbuntuShape.Flat;
829 }
830- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
831- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;
832- Component.onCompleted: { updateWidthHeightBindings(); }
833- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
834- function updateWidthHeightBindings() {
835- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
836- width = root.fixedArtShapeSize.width;
837- height = root.fixedArtShapeSize.height;
838- } else {
839- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
840- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
841- }
842- }
843+ width: root.fixedArtShapeSize.width;
844+ height: root.fixedArtShapeSize.height;
845 CroppedImageMinimumSourceSize {
846 id: artImage;
847 objectName: "artImage";
848@@ -57,10 +42,9 @@
849 asynchronous: true;
850 visible: false;
851 width: root.width;
852- height: width / artShape.aspect;
853+ height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
854 }
855 }
856- }
857 }
858 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
859 Label {
860@@ -68,7 +52,7 @@
861 objectName: "titleLabel";
862 anchors { right: parent.right;
863 left: parent.left;
864- top: artShapeHolder.bottom;
865+ top: artShapeLoader.bottom;
866 topMargin: units.gu(1);
867 }
868 elide: Text.ElideRight;
869@@ -112,7 +96,7 @@
870 UbuntuShape {
871 id: touchdown;
872 objectName: "touchdown";
873- anchors { fill: artShapeHolder }
874+ anchors { fill: artShapeLoader }
875 visible: root.pressed;
876 radius: "medium";
877 borderSource: "radius_pressed.sci"
878
879=== modified file 'tests/plugins/Dash/cardcreator/12.res.cardcreator'
880--- tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-20 16:16:18 +0000
881+++ tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-20 16:16:18 +0000
882@@ -4,20 +4,15 @@
883 property string backgroundShapeStyle: "inset";
884 property real fontScale: 1.0;
885 property var scopeStyle: null;
886- property size fixedArtShapeSize: Qt.size(-1, -1);
887 readonly property string title: cardData && cardData["title"] || "";
888 property bool showHeader: true;
889 implicitWidth: childrenRect.width;
890 enabled: true;
891 signal action(var actionId);
892 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
893-Item {
894- id: artShapeHolder;
895- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
896- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
897- anchors { horizontalCenter: parent.horizontalCenter; }
898- Loader {
899+Loader {
900 id: artShapeLoader;
901+ anchors { horizontalCenter: parent.horizontalCenter; }
902 objectName: "artShapeLoader";
903 readonly property string cardArt: cardData && cardData["art"] || "";
904 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
905@@ -36,19 +31,8 @@
906 radius: "medium";
907 aspect: UbuntuShape.Flat;
908 }
909- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
910- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;
911- Component.onCompleted: { updateWidthHeightBindings(); }
912- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
913- function updateWidthHeightBindings() {
914- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
915- width = root.fixedArtShapeSize.width;
916- height = root.fixedArtShapeSize.height;
917- } else {
918- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
919- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
920- }
921- }
922+ width: image.status !== Image.Ready ? 0 : image.width;
923+ height: image.status !== Image.Ready ? 0 : image.height;
924 CroppedImageMinimumSourceSize {
925 id: artImage;
926 objectName: "artImage";
927@@ -56,10 +40,9 @@
928 asynchronous: false;
929 visible: false;
930 width: root.width;
931- height: width / artShape.aspect;
932+ height: width / 0.75;
933 }
934 }
935- }
936 }
937 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
938 Label {
939@@ -67,7 +50,7 @@
940 objectName: "titleLabel";
941 anchors { right: parent.right;
942 left: parent.left;
943- top: artShapeHolder.bottom;
944+ top: artShapeLoader.bottom;
945 topMargin: units.gu(1);
946 }
947 elide: Text.ElideRight;
948@@ -111,7 +94,7 @@
949 UbuntuShape {
950 id: touchdown;
951 objectName: "touchdown";
952- anchors { fill: artShapeHolder }
953+ anchors { fill: artShapeLoader }
954 visible: root.pressed;
955 radius: "medium";
956 borderSource: "radius_pressed.sci"
957
958=== modified file 'tests/plugins/Dash/cardcreator/2.res'
959--- tests/plugins/Dash/cardcreator/2.res 2016-05-20 16:16:18 +0000
960+++ tests/plugins/Dash/cardcreator/2.res 2016-05-20 16:16:18 +0000
961@@ -4,12 +4,12 @@
962 property string backgroundShapeStyle: "inset";
963 property real fontScale: 1.0;
964 property var scopeStyle: null;
965+ readonly property string title: cardData && cardData["title"] || "";
966+ property bool showHeader: true;
967+ implicitWidth: childrenRect.width;
968+ enabled: true;
969 property int fixedHeaderHeight: -1;
970 property size fixedArtShapeSize: Qt.size(-1, -1);
971- readonly property string title: cardData && cardData["title"] || "";
972- property bool showHeader: true;
973- implicitWidth: childrenRect.width;
974- enabled: true;
975 signal action(var actionId);
976 Loader {
977 id: backgroundLoader;
978
979=== modified file 'tests/plugins/Dash/cardcreator/2.res.cardcreator'
980--- tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-05-20 16:16:18 +0000
981+++ tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-05-20 16:16:18 +0000
982@@ -4,7 +4,6 @@
983 property string backgroundShapeStyle: "inset";
984 property real fontScale: 1.0;
985 property var scopeStyle: null;
986- property size fixedArtShapeSize: Qt.size(-1, -1);
987 readonly property string title: cardData && cardData["title"] || "";
988 property bool showHeader: true;
989 implicitWidth: childrenRect.width;
990
991=== modified file 'tests/plugins/Dash/cardcreator/3.res'
992--- tests/plugins/Dash/cardcreator/3.res 2016-05-20 16:16:18 +0000
993+++ tests/plugins/Dash/cardcreator/3.res 2016-05-20 16:16:18 +0000
994@@ -4,21 +4,17 @@
995 property string backgroundShapeStyle: "inset";
996 property real fontScale: 1.0;
997 property var scopeStyle: null;
998+ readonly property string title: cardData && cardData["title"] || "";
999+ property bool showHeader: true;
1000+ implicitWidth: childrenRect.width;
1001+ enabled: true;
1002 property int fixedHeaderHeight: -1;
1003 property size fixedArtShapeSize: Qt.size(-1, -1);
1004- readonly property string title: cardData && cardData["title"] || "";
1005- property bool showHeader: true;
1006- implicitWidth: childrenRect.width;
1007- enabled: true;
1008 signal action(var actionId);
1009 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1010-Item {
1011- id: artShapeHolder;
1012- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
1013- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
1014- anchors { horizontalCenter: parent.horizontalCenter; }
1015- Loader {
1016+Loader {
1017 id: artShapeLoader;
1018+ anchors { horizontalCenter: parent.horizontalCenter; }
1019 objectName: "artShapeLoader";
1020 readonly property string cardArt: cardData && cardData["art"] || decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
1021 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
1022@@ -35,19 +31,8 @@
1023 source: artImage;
1024 aspect: UbuntuShape.DropShadow;
1025 }
1026- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
1027- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;
1028- Component.onCompleted: { updateWidthHeightBindings(); }
1029- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
1030- function updateWidthHeightBindings() {
1031- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
1032- width = root.fixedArtShapeSize.width;
1033- height = root.fixedArtShapeSize.height;
1034- } else {
1035- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
1036- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
1037- }
1038- }
1039+ width: root.fixedArtShapeSize.width;
1040+ height: root.fixedArtShapeSize.height;
1041 CroppedImageMinimumSourceSize {
1042 id: artImage;
1043 objectName: "artImage";
1044@@ -55,11 +40,10 @@
1045 asynchronous: true;
1046 visible: false;
1047 width: root.width;
1048- height: width / artShape.aspect;
1049+ height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
1050 onStatusChanged: if (status === Image.Error) source = decodeURI("IHAVE%5C%22ESCAPED%5C%22QUOTES%5C%22");
1051 }
1052 }
1053- }
1054 }
1055 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
1056 Label {
1057@@ -67,7 +51,7 @@
1058 objectName: "titleLabel";
1059 anchors { right: parent.right;
1060 left: parent.left;
1061- top: artShapeHolder.bottom;
1062+ top: artShapeLoader.bottom;
1063 topMargin: units.gu(1);
1064 }
1065 elide: Text.ElideRight;
1066
1067=== modified file 'tests/plugins/Dash/cardcreator/3.res.cardcreator'
1068--- tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-20 16:16:18 +0000
1069+++ tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-20 16:16:18 +0000
1070@@ -4,20 +4,15 @@
1071 property string backgroundShapeStyle: "inset";
1072 property real fontScale: 1.0;
1073 property var scopeStyle: null;
1074- property size fixedArtShapeSize: Qt.size(-1, -1);
1075 readonly property string title: cardData && cardData["title"] || "";
1076 property bool showHeader: true;
1077 implicitWidth: childrenRect.width;
1078 enabled: true;
1079 signal action(var actionId);
1080 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1081-Item {
1082- id: artShapeHolder;
1083- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
1084- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
1085+Loader {
1086+ id: artShapeLoader;
1087 anchors { horizontalCenter: parent.horizontalCenter; }
1088- Loader {
1089- id: artShapeLoader;
1090 objectName: "artShapeLoader";
1091 readonly property string cardArt: cardData && cardData["art"] || "";
1092 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
1093@@ -34,19 +29,8 @@
1094 source: artImage;
1095 aspect: UbuntuShape.DropShadow;
1096 }
1097- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
1098- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75;
1099- Component.onCompleted: { updateWidthHeightBindings(); }
1100- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
1101- function updateWidthHeightBindings() {
1102- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
1103- width = root.fixedArtShapeSize.width;
1104- height = root.fixedArtShapeSize.height;
1105- } else {
1106- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
1107- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
1108- }
1109- }
1110+ width: image.status !== Image.Ready ? 0 : image.width;
1111+ height: image.status !== Image.Ready ? 0 : image.height;
1112 CroppedImageMinimumSourceSize {
1113 id: artImage;
1114 objectName: "artImage";
1115@@ -54,10 +38,9 @@
1116 asynchronous: false;
1117 visible: false;
1118 width: root.width;
1119- height: width / artShape.aspect;
1120+ height: width / 0.75;
1121 }
1122 }
1123- }
1124 }
1125 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
1126 Label {
1127@@ -65,7 +48,7 @@
1128 objectName: "titleLabel";
1129 anchors { right: parent.right;
1130 left: parent.left;
1131- top: artShapeHolder.bottom;
1132+ top: artShapeLoader.bottom;
1133 topMargin: units.gu(1);
1134 }
1135 elide: Text.ElideRight;
1136
1137=== modified file 'tests/plugins/Dash/cardcreator/4.res'
1138--- tests/plugins/Dash/cardcreator/4.res 2016-05-20 16:16:18 +0000
1139+++ tests/plugins/Dash/cardcreator/4.res 2016-05-20 16:16:18 +0000
1140@@ -4,12 +4,12 @@
1141 property string backgroundShapeStyle: "inset";
1142 property real fontScale: 1.0;
1143 property var scopeStyle: null;
1144+ readonly property string title: cardData && cardData["title"] || "";
1145+ property bool showHeader: true;
1146+ implicitWidth: childrenRect.width;
1147+ enabled: true;
1148 property int fixedHeaderHeight: -1;
1149 property size fixedArtShapeSize: Qt.size(-1, -1);
1150- readonly property string title: cardData && cardData["title"] || "";
1151- property bool showHeader: true;
1152- implicitWidth: childrenRect.width;
1153- enabled: true;
1154 signal action(var actionId);
1155 readonly property size artShapeSize: Qt.size(-1, -1);
1156 readonly property int headerHeight: row.height;
1157
1158=== modified file 'tests/plugins/Dash/cardcreator/4.res.cardcreator'
1159--- tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-05-20 16:16:18 +0000
1160+++ tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-05-20 16:16:18 +0000
1161@@ -4,7 +4,6 @@
1162 property string backgroundShapeStyle: "inset";
1163 property real fontScale: 1.0;
1164 property var scopeStyle: null;
1165- property size fixedArtShapeSize: Qt.size(-1, -1);
1166 readonly property string title: cardData && cardData["title"] || "";
1167 property bool showHeader: true;
1168 implicitWidth: childrenRect.width;
1169
1170=== modified file 'tests/plugins/Dash/cardcreator/5.res'
1171--- tests/plugins/Dash/cardcreator/5.res 2016-05-20 16:16:18 +0000
1172+++ tests/plugins/Dash/cardcreator/5.res 2016-05-20 16:16:18 +0000
1173@@ -4,21 +4,17 @@
1174 property string backgroundShapeStyle: "inset";
1175 property real fontScale: 1.0;
1176 property var scopeStyle: null;
1177+ readonly property string title: cardData && cardData["title"] || "";
1178+ property bool showHeader: true;
1179+ implicitWidth: childrenRect.width;
1180+ enabled: false;
1181 property int fixedHeaderHeight: -1;
1182 property size fixedArtShapeSize: Qt.size(-1, -1);
1183- readonly property string title: cardData && cardData["title"] || "";
1184- property bool showHeader: true;
1185- implicitWidth: childrenRect.width;
1186- enabled: false;
1187 signal action(var actionId);
1188 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1189-Item {
1190- id: artShapeHolder;
1191- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
1192- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
1193- anchors { horizontalCenter: parent.horizontalCenter; }
1194- Loader {
1195+Loader {
1196 id: artShapeLoader;
1197+ anchors { horizontalCenter: parent.horizontalCenter; }
1198 objectName: "artShapeLoader";
1199 readonly property string cardArt: cardData && cardData["art"] || "";
1200 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
1201@@ -30,19 +26,8 @@
1202 objectName: "artShape";
1203 visible: image.status == Image.Ready;
1204 readonly property alias image: artImage;
1205- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
1206- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
1207- Component.onCompleted: { updateWidthHeightBindings(); }
1208- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
1209- function updateWidthHeightBindings() {
1210- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
1211- width = root.fixedArtShapeSize.width;
1212- height = root.fixedArtShapeSize.height;
1213- } else {
1214- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
1215- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
1216- }
1217- }
1218+ width: root.fixedArtShapeSize.width;
1219+ height: root.fixedArtShapeSize.height;
1220 CroppedImageMinimumSourceSize {
1221 id: artImage;
1222 objectName: "artImage";
1223@@ -50,15 +35,14 @@
1224 asynchronous: true;
1225 visible: true;
1226 width: root.width;
1227- height: width / artShape.aspect;
1228+ height: width / (root.fixedArtShapeSize.width / root.fixedArtShapeSize.height);
1229 }
1230 }
1231- }
1232 }
1233 Loader {
1234 id: overlayLoader;
1235 readonly property real overlayHeight: root.fixedHeaderHeight + units.gu(2);
1236- anchors.fill: artShapeHolder;
1237+ anchors.fill: artShapeLoader;
1238 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
1239 asynchronous: true;
1240 visible: showHeader && status == Loader.Ready;
1241@@ -113,5 +97,5 @@
1242 text: cardData && cardData["subtitle"] || "";
1243 font.weight: Font.Light;
1244 }
1245-implicitHeight: artShapeHolder.height;
1246+implicitHeight: artShapeLoader.height;
1247 }
1248
1249=== modified file 'tests/plugins/Dash/cardcreator/5.res.cardcreator'
1250--- tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-20 16:16:18 +0000
1251+++ tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-20 16:16:18 +0000
1252@@ -4,20 +4,15 @@
1253 property string backgroundShapeStyle: "inset";
1254 property real fontScale: 1.0;
1255 property var scopeStyle: null;
1256- property size fixedArtShapeSize: Qt.size(-1, -1);
1257 readonly property string title: cardData && cardData["title"] || "";
1258 property bool showHeader: true;
1259 implicitWidth: childrenRect.width;
1260 enabled: false;
1261 signal action(var actionId);
1262 readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
1263-Item {
1264- id: artShapeHolder;
1265- height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height;
1266- width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width;
1267- anchors { horizontalCenter: parent.horizontalCenter; }
1268- Loader {
1269+Loader {
1270 id: artShapeLoader;
1271+ anchors { horizontalCenter: parent.horizontalCenter; }
1272 objectName: "artShapeLoader";
1273 readonly property string cardArt: cardData && cardData["art"] || "";
1274 onCardArtChanged: { if (item) { item.image.source = cardArt; } }
1275@@ -29,19 +24,8 @@
1276 objectName: "artShape";
1277 visible: image.status == Image.Ready;
1278 readonly property alias image: artImage;
1279- readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
1280- readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
1281- Component.onCompleted: { updateWidthHeightBindings(); }
1282- Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
1283- function updateWidthHeightBindings() {
1284- if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
1285- width = root.fixedArtShapeSize.width;
1286- height = root.fixedArtShapeSize.height;
1287- } else {
1288- width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width });
1289- height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height });
1290- }
1291- }
1292+ width: image.status !== Image.Ready ? 0 : image.width;
1293+ height: image.status !== Image.Ready ? 0 : image.height;
1294 CroppedImageMinimumSourceSize {
1295 id: artImage;
1296 objectName: "artImage";
1297@@ -49,15 +33,14 @@
1298 asynchronous: false;
1299 visible: true;
1300 width: root.width;
1301- height: width / artShape.aspect;
1302+ height: width / 1;
1303 }
1304 }
1305- }
1306 }
1307 Loader {
1308 id: overlayLoader;
1309 readonly property real overlayHeight: headerHeight + units.gu(2);
1310- anchors.fill: artShapeHolder;
1311+ anchors.fill: artShapeLoader;
1312 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
1313 asynchronous: false;
1314 visible: showHeader && status == Loader.Ready;
1315@@ -112,5 +95,5 @@
1316 text: cardData && cardData["subtitle"] || "";
1317 font.weight: Font.Light;
1318 }
1319-implicitHeight: artShapeHolder.height;
1320+implicitHeight: artShapeLoader.height;
1321 }
1322
1323=== modified file 'tests/plugins/Dash/cardcreator/6.res'
1324--- tests/plugins/Dash/cardcreator/6.res 2016-05-20 16:16:18 +0000
1325+++ tests/plugins/Dash/cardcreator/6.res 2016-05-20 16:16:18 +0000
1326@@ -4,12 +4,12 @@
1327 property string backgroundShapeStyle: "inset";
1328 property real fontScale: 1.0;
1329 property var scopeStyle: null;
1330- property int fixedHeaderHeight: -1;
1331- property size fixedArtShapeSize: Qt.size(-1, -1);
1332 readonly property string title: cardData && cardData["title"] || "";
1333 property bool showHeader: true;
1334 implicitWidth: childrenRect.width;
1335 enabled: true;
1336+ property int fixedHeaderHeight: -1;
1337+ property size fixedArtShapeSize: Qt.size(-1, -1);
1338 signal action(var actionId);
1339 Loader {
1340 id: backgroundLoader;
1341
1342=== modified file 'tests/plugins/Dash/cardcreator/6.res.cardcreator'
1343--- tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-05-20 16:16:18 +0000
1344+++ tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-05-20 16:16:18 +0000
1345@@ -4,7 +4,6 @@
1346 property string backgroundShapeStyle: "inset";
1347 property real fontScale: 1.0;
1348 property var scopeStyle: null;
1349- property size fixedArtShapeSize: Qt.size(-1, -1);
1350 readonly property string title: cardData && cardData["title"] || "";
1351 property bool showHeader: true;
1352 implicitWidth: childrenRect.width;
1353
1354=== modified file 'tests/plugins/Dash/cardcreator/7.res'
1355--- tests/plugins/Dash/cardcreator/7.res 2016-05-20 16:16:18 +0000
1356+++ tests/plugins/Dash/cardcreator/7.res 2016-05-20 16:16:18 +0000
1357@@ -4,12 +4,12 @@
1358 property string backgroundShapeStyle: "inset";
1359 property real fontScale: 1.0;
1360 property var scopeStyle: null;
1361+ readonly property string title: cardData && cardData["title"] || "";
1362+ property bool showHeader: true;
1363+ implicitWidth: childrenRect.width;
1364+ enabled: true;
1365 property int fixedHeaderHeight: -1;
1366 property size fixedArtShapeSize: Qt.size(-1, -1);
1367- readonly property string title: cardData && cardData["title"] || "";
1368- property bool showHeader: true;
1369- implicitWidth: childrenRect.width;
1370- enabled: true;
1371 signal action(var actionId);
1372 Loader {
1373 id: backgroundLoader;
1374
1375=== modified file 'tests/plugins/Dash/cardcreator/7.res.cardcreator'
1376--- tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-05-20 16:16:18 +0000
1377+++ tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-05-20 16:16:18 +0000
1378@@ -4,7 +4,6 @@
1379 property string backgroundShapeStyle: "inset";
1380 property real fontScale: 1.0;
1381 property var scopeStyle: null;
1382- property size fixedArtShapeSize: Qt.size(-1, -1);
1383 readonly property string title: cardData && cardData["title"] || "";
1384 property bool showHeader: true;
1385 implicitWidth: childrenRect.width;
1386
1387=== modified file 'tests/plugins/Dash/cardcreator/8.res'
1388--- tests/plugins/Dash/cardcreator/8.res 2016-05-20 16:16:18 +0000
1389+++ tests/plugins/Dash/cardcreator/8.res 2016-05-20 16:16:18 +0000
1390@@ -4,12 +4,12 @@
1391 property string backgroundShapeStyle: "inset";
1392 property real fontScale: 1.0;
1393 property var scopeStyle: null;
1394+ readonly property string title: cardData && cardData["title"] || "";
1395+ property bool showHeader: true;
1396+ implicitWidth: childrenRect.width;
1397+ enabled: true;
1398 property int fixedHeaderHeight: -1;
1399 property size fixedArtShapeSize: Qt.size(-1, -1);
1400- readonly property string title: cardData && cardData["title"] || "";
1401- property bool showHeader: true;
1402- implicitWidth: childrenRect.width;
1403- enabled: true;
1404 signal action(var actionId);
1405 Loader {
1406 id: backgroundLoader;
1407
1408=== modified file 'tests/plugins/Dash/cardcreator/8.res.cardcreator'
1409--- tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-05-20 16:16:18 +0000
1410+++ tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-05-20 16:16:18 +0000
1411@@ -4,7 +4,6 @@
1412 property string backgroundShapeStyle: "inset";
1413 property real fontScale: 1.0;
1414 property var scopeStyle: null;
1415- property size fixedArtShapeSize: Qt.size(-1, -1);
1416 readonly property string title: cardData && cardData["title"] || "";
1417 property bool showHeader: true;
1418 implicitWidth: childrenRect.width;
1419
1420=== modified file 'tests/plugins/Dash/cardcreator/9.res'
1421--- tests/plugins/Dash/cardcreator/9.res 2016-05-20 16:16:18 +0000
1422+++ tests/plugins/Dash/cardcreator/9.res 2016-05-20 16:16:18 +0000
1423@@ -4,12 +4,12 @@
1424 property string backgroundShapeStyle: "inset";
1425 property real fontScale: 1.0;
1426 property var scopeStyle: null;
1427+ readonly property string title: cardData && cardData["title"] || "";
1428+ property bool showHeader: true;
1429+ implicitWidth: childrenRect.width;
1430+ enabled: true;
1431 property int fixedHeaderHeight: -1;
1432 property size fixedArtShapeSize: Qt.size(-1, -1);
1433- readonly property string title: cardData && cardData["title"] || "";
1434- property bool showHeader: true;
1435- implicitWidth: childrenRect.width;
1436- enabled: true;
1437 signal action(var actionId);
1438 readonly property size artShapeSize: Qt.size(-1, -1);
1439 readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin;
1440
1441=== modified file 'tests/plugins/Dash/cardcreator/9.res.cardcreator'
1442--- tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-05-20 16:16:18 +0000
1443+++ tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-05-20 16:16:18 +0000
1444@@ -4,7 +4,6 @@
1445 property string backgroundShapeStyle: "inset";
1446 property real fontScale: 1.0;
1447 property var scopeStyle: null;
1448- property size fixedArtShapeSize: Qt.size(-1, -1);
1449 readonly property string title: cardData && cardData["title"] || "";
1450 property bool showHeader: true;
1451 implicitWidth: childrenRect.width;

Subscribers

People subscribed via source and target branches