Merge lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard into lp:unity8
- noFixedArtShapeSizeForCardToolCard
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Andrea Cimitan |
Approved revision: | 2219 |
Merged at revision: | 2454 |
Proposed branch: | lp:~aacid/unity8/noFixedArtShapeSizeForCardToolCard |
Merge into: | lp:unity8 |
Prerequisite: | lp:~aacid/unity8/optimize_card_attribute_creation |
Diff against target: |
665 lines (+130/-145) 25 files modified
plugins/Dash/CardCreator.js (+59/-12) tests/plugins/Dash/cardcreator/1.res (+4/-4) tests/plugins/Dash/cardcreator/1.res.cardcreator (+5/-16) tests/plugins/Dash/cardcreator/10.res (+4/-4) tests/plugins/Dash/cardcreator/10.res.cardcreator (+0/-1) tests/plugins/Dash/cardcreator/11.res (+4/-4) tests/plugins/Dash/cardcreator/11.res.cardcreator (+5/-16) tests/plugins/Dash/cardcreator/12.res (+4/-4) tests/plugins/Dash/cardcreator/12.res.cardcreator (+5/-16) tests/plugins/Dash/cardcreator/2.res (+4/-4) tests/plugins/Dash/cardcreator/2.res.cardcreator (+0/-1) tests/plugins/Dash/cardcreator/3.res (+4/-4) tests/plugins/Dash/cardcreator/3.res.cardcreator (+5/-16) tests/plugins/Dash/cardcreator/4.res (+4/-4) tests/plugins/Dash/cardcreator/4.res.cardcreator (+0/-1) tests/plugins/Dash/cardcreator/5.res (+4/-4) tests/plugins/Dash/cardcreator/5.res.cardcreator (+5/-16) 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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot | continuous-integration | Approve | |
Andrea Cimitan (community) | Approve | ||
Review via email: mp+295424@code.launchpad.net |
This proposal supersedes a proposal from 2016-05-20.
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
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2221
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2221
https:/
Executed test runs:
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2219
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Andrea Cimitan (cimi) wrote : | # |
Green light!
* Did you perform an exploratory manual test run of the code change and any related functionality?
yes
* Did CI run pass? If not, please explain why.
y
- 2220. By Albert Astals Cid
-
Merge
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2219
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'plugins/Dash/CardCreator.js' | |||
2 | --- plugins/Dash/CardCreator.js 2016-05-09 08:55:24 +0000 | |||
3 | +++ plugins/Dash/CardCreator.js 2016-06-02 08:10:42 +0000 | |||
4 | @@ -129,6 +129,51 @@ | |||
5 | 129 | } \n\ | 129 | } \n\ |
6 | 130 | }\n'; | 130 | }\n'; |
7 | 131 | 131 | ||
8 | 132 | // %1 is used as anchors of artShapeHolder | ||
9 | 133 | // %2 is used as image width | ||
10 | 134 | // %3 is used as image height | ||
11 | 135 | // %4 is whether the image should be visible | ||
12 | 136 | // %5 is used as aspect ratio | ||
13 | 137 | // %6 is whether the loader should be asynchronous or not | ||
14 | 138 | // %7 is the shape code we want to use | ||
15 | 139 | // %8 is injected as code to artImage | ||
16 | 140 | // %9 is used as image fallback | ||
17 | 141 | var kArtShapeHolderCodeCardToolCard = 'Item { \n\ | ||
18 | 142 | id: artShapeHolder; \n\ | ||
19 | 143 | height: artShapeLoader.height; \n\ | ||
20 | 144 | width: artShapeLoader.width; \n\ | ||
21 | 145 | anchors { %1 } \n\ | ||
22 | 146 | Loader { \n\ | ||
23 | 147 | id: artShapeLoader; \n\ | ||
24 | 148 | objectName: "artShapeLoader"; \n\ | ||
25 | 149 | readonly property string cardArt: cardData && cardData["art"] || %9; \n\ | ||
26 | 150 | onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\ | ||
27 | 151 | active: cardArt != ""; \n\ | ||
28 | 152 | asynchronous: %6; \n\ | ||
29 | 153 | visible: status == Loader.Ready; \n\ | ||
30 | 154 | sourceComponent: Item { \n\ | ||
31 | 155 | id: artShape; \n\ | ||
32 | 156 | objectName: "artShape"; \n\ | ||
33 | 157 | visible: image.status == Image.Ready; \n\ | ||
34 | 158 | readonly property alias image: artImage; \n\ | ||
35 | 159 | %7 \n\ | ||
36 | 160 | readonly property real aspect: %5; \n\ | ||
37 | 161 | width: image.status !== Image.Ready ? 0 : image.width; \n\ | ||
38 | 162 | height: image.status !== Image.Ready ? 0 : image.height; \n\ | ||
39 | 163 | CroppedImageMinimumSourceSize { \n\ | ||
40 | 164 | id: artImage; \n\ | ||
41 | 165 | objectName: "artImage"; \n\ | ||
42 | 166 | source: artShapeLoader.cardArt; \n\ | ||
43 | 167 | asynchronous: %6; \n\ | ||
44 | 168 | visible: %4; \n\ | ||
45 | 169 | width: %2; \n\ | ||
46 | 170 | height: %3; \n\ | ||
47 | 171 | %8 \n\ | ||
48 | 172 | } \n\ | ||
49 | 173 | } \n\ | ||
50 | 174 | } \n\ | ||
51 | 175 | }\n'; | ||
52 | 176 | |||
53 | 132 | // %1 is anchors.fill | 177 | // %1 is anchors.fill |
54 | 133 | // %2 is width | 178 | // %2 is width |
55 | 134 | // %3 is height | 179 | // %3 is height |
56 | @@ -416,15 +461,16 @@ | |||
57 | 416 | property string backgroundShapeStyle: "inset"; \n\ | 461 | property string backgroundShapeStyle: "inset"; \n\ |
58 | 417 | property real fontScale: 1.0; \n\ | 462 | property real fontScale: 1.0; \n\ |
59 | 418 | property var scopeStyle: null; \n\ | 463 | property var scopeStyle: null; \n\ |
60 | 419 | %2\ | ||
61 | 420 | property size fixedArtShapeSize: Qt.size(-1, -1); \n\ | ||
62 | 421 | readonly property string title: cardData && cardData["title"] || ""; \n\ | 464 | readonly property string title: cardData && cardData["title"] || ""; \n\ |
63 | 422 | property bool showHeader: true; \n\ | 465 | property bool showHeader: true; \n\ |
64 | 423 | implicitWidth: childrenRect.width; \n\ | 466 | implicitWidth: childrenRect.width; \n\ |
65 | 424 | enabled: %1; \n\ | 467 | enabled: %1; \n\ |
66 | 425 | \n'.arg(templateInteractive); | 468 | \n'.arg(templateInteractive); |
67 | 426 | 469 | ||
69 | 427 | code = code.arg(isCardTool ? "" : "property int fixedHeaderHeight: -1; \n"); | 470 | if (!isCardTool) { |
70 | 471 | code += "property int fixedHeaderHeight: -1; \n\ | ||
71 | 472 | property size fixedArtShapeSize: Qt.size(-1, -1); \n"; | ||
72 | 473 | } | ||
73 | 428 | 474 | ||
74 | 429 | var hasArt = components["art"] && components["art"]["field"] || false; | 475 | var hasArt = components["art"] && components["art"]["field"] || false; |
75 | 430 | var hasSummary = components["summary"] || false; | 476 | var hasSummary = components["summary"] || false; |
76 | @@ -533,15 +579,16 @@ | |||
77 | 533 | } else { | 579 | } else { |
78 | 534 | artShapeHolderShapeCode = ""; | 580 | artShapeHolderShapeCode = ""; |
79 | 535 | } | 581 | } |
89 | 536 | code += kArtShapeHolderCode.arg(artAnchors) | 582 | var artShapeHolderCode = isCardTool ? kArtShapeHolderCodeCardToolCard : kArtShapeHolderCode; |
90 | 537 | .arg(widthCode) | 583 | code += artShapeHolderCode.arg(artAnchors) |
91 | 538 | .arg(heightCode) | 584 | .arg(widthCode) |
92 | 539 | .arg(isConciergeMode ? "true" : "false") | 585 | .arg(heightCode) |
93 | 540 | .arg(aspectRatio) | 586 | .arg(isConciergeMode ? "true" : "false") |
94 | 541 | .arg(asynchronous) | 587 | .arg(aspectRatio) |
95 | 542 | .arg(artShapeHolderShapeCode) | 588 | .arg(asynchronous) |
96 | 543 | .arg(fallbackStatusCode) | 589 | .arg(artShapeHolderShapeCode) |
97 | 544 | .arg(fallbackURICode); | 590 | .arg(fallbackStatusCode) |
98 | 591 | .arg(fallbackURICode); | ||
99 | 545 | } else { | 592 | } else { |
100 | 546 | code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n' | 593 | code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n' |
101 | 547 | } | 594 | } |
102 | 548 | 595 | ||
103 | === modified file 'tests/plugins/Dash/cardcreator/1.res' | |||
104 | --- tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:55:24 +0000 | |||
105 | +++ tests/plugins/Dash/cardcreator/1.res 2016-06-02 08:10:42 +0000 | |||
106 | @@ -4,12 +4,12 @@ | |||
107 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
108 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
109 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
110 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
111 | 8 | property bool showHeader: true; | ||
112 | 9 | implicitWidth: childrenRect.width; | ||
113 | 10 | enabled: true; | ||
114 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
115 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
116 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
117 | 10 | property bool showHeader: true; | ||
118 | 11 | implicitWidth: childrenRect.width; | ||
119 | 12 | enabled: true; | ||
120 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
121 | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
122 | 15 | Item { | 15 | Item { |
123 | 16 | 16 | ||
124 | === modified file 'tests/plugins/Dash/cardcreator/1.res.cardcreator' | |||
125 | --- tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:55:24 +0000 | |||
126 | +++ tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
127 | @@ -4,7 +4,6 @@ | |||
128 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
129 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
130 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
131 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
132 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
133 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
134 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
135 | @@ -13,8 +12,8 @@ | |||
136 | 13 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 12 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
137 | 14 | Item { | 13 | Item { |
138 | 15 | id: artShapeHolder; | 14 | id: artShapeHolder; |
141 | 16 | height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; | 15 | height: artShapeLoader.height; |
142 | 17 | width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; | 16 | width: artShapeLoader.width; |
143 | 18 | anchors { horizontalCenter: parent.horizontalCenter; } | 17 | anchors { horizontalCenter: parent.horizontalCenter; } |
144 | 19 | Loader { | 18 | Loader { |
145 | 20 | id: artShapeLoader; | 19 | id: artShapeLoader; |
146 | @@ -36,19 +35,9 @@ | |||
147 | 36 | radius: "medium"; | 35 | radius: "medium"; |
148 | 37 | aspect: UbuntuShape.Inset; | 36 | aspect: UbuntuShape.Inset; |
149 | 38 | } | 37 | } |
163 | 39 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; | 38 | readonly property real aspect: 1.6; |
164 | 40 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1.6; | 39 | width: image.status !== Image.Ready ? 0 : image.width; |
165 | 41 | Component.onCompleted: { updateWidthHeightBindings(); } | 40 | height: image.status !== Image.Ready ? 0 : image.height; |
153 | 42 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } | ||
154 | 43 | function updateWidthHeightBindings() { | ||
155 | 44 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { | ||
156 | 45 | width = root.fixedArtShapeSize.width; | ||
157 | 46 | height = root.fixedArtShapeSize.height; | ||
158 | 47 | } else { | ||
159 | 48 | width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); | ||
160 | 49 | height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); | ||
161 | 50 | } | ||
162 | 51 | } | ||
166 | 52 | CroppedImageMinimumSourceSize { | 41 | CroppedImageMinimumSourceSize { |
167 | 53 | id: artImage; | 42 | id: artImage; |
168 | 54 | objectName: "artImage"; | 43 | objectName: "artImage"; |
169 | 55 | 44 | ||
170 | === modified file 'tests/plugins/Dash/cardcreator/10.res' | |||
171 | --- tests/plugins/Dash/cardcreator/10.res 2016-05-09 08:34:38 +0000 | |||
172 | +++ tests/plugins/Dash/cardcreator/10.res 2016-06-02 08:10:42 +0000 | |||
173 | @@ -4,12 +4,12 @@ | |||
174 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
175 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
176 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
177 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
178 | 8 | property bool showHeader: true; | ||
179 | 9 | implicitWidth: childrenRect.width; | ||
180 | 10 | enabled: true; | ||
181 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
182 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
183 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
184 | 10 | property bool showHeader: true; | ||
185 | 11 | implicitWidth: childrenRect.width; | ||
186 | 12 | enabled: true; | ||
187 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
188 | 14 | Loader { | 14 | Loader { |
189 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
190 | 16 | 16 | ||
191 | === modified file 'tests/plugins/Dash/cardcreator/10.res.cardcreator' | |||
192 | --- tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
193 | +++ tests/plugins/Dash/cardcreator/10.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
194 | @@ -4,7 +4,6 @@ | |||
195 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
196 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
197 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
198 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
199 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
200 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
201 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
202 | 11 | 10 | ||
203 | === modified file 'tests/plugins/Dash/cardcreator/11.res' | |||
204 | --- tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:55:24 +0000 | |||
205 | +++ tests/plugins/Dash/cardcreator/11.res 2016-06-02 08:10:42 +0000 | |||
206 | @@ -4,12 +4,12 @@ | |||
207 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
208 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
209 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
210 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
211 | 8 | property bool showHeader: true; | ||
212 | 9 | implicitWidth: childrenRect.width; | ||
213 | 10 | enabled: true; | ||
214 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
215 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
216 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
217 | 10 | property bool showHeader: true; | ||
218 | 11 | implicitWidth: childrenRect.width; | ||
219 | 12 | enabled: true; | ||
220 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
221 | 14 | Loader { | 14 | Loader { |
222 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
223 | 16 | 16 | ||
224 | === modified file 'tests/plugins/Dash/cardcreator/11.res.cardcreator' | |||
225 | --- tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:55:24 +0000 | |||
226 | +++ tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
227 | @@ -4,7 +4,6 @@ | |||
228 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
229 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
230 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
231 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
232 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
233 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
234 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
235 | @@ -51,8 +50,8 @@ | |||
236 | 51 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 50 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
237 | 52 | Item { | 51 | Item { |
238 | 53 | id: artShapeHolder; | 52 | id: artShapeHolder; |
241 | 54 | height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; | 53 | height: artShapeLoader.height; |
242 | 55 | width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; | 54 | width: artShapeLoader.width; |
243 | 56 | anchors { horizontalCenter: parent.horizontalCenter; } | 55 | anchors { horizontalCenter: parent.horizontalCenter; } |
244 | 57 | Loader { | 56 | Loader { |
245 | 58 | id: artShapeLoader; | 57 | id: artShapeLoader; |
246 | @@ -74,19 +73,9 @@ | |||
247 | 74 | radius: "medium"; | 73 | radius: "medium"; |
248 | 75 | aspect: UbuntuShape.Flat; | 74 | aspect: UbuntuShape.Flat; |
249 | 76 | } | 75 | } |
263 | 77 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; | 76 | readonly property real aspect: 1; |
264 | 78 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1; | 77 | width: image.status !== Image.Ready ? 0 : image.width; |
265 | 79 | Component.onCompleted: { updateWidthHeightBindings(); } | 78 | height: image.status !== Image.Ready ? 0 : image.height; |
253 | 80 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } | ||
254 | 81 | function updateWidthHeightBindings() { | ||
255 | 82 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { | ||
256 | 83 | width = root.fixedArtShapeSize.width; | ||
257 | 84 | height = root.fixedArtShapeSize.height; | ||
258 | 85 | } else { | ||
259 | 86 | width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); | ||
260 | 87 | height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); | ||
261 | 88 | } | ||
262 | 89 | } | ||
266 | 90 | CroppedImageMinimumSourceSize { | 79 | CroppedImageMinimumSourceSize { |
267 | 91 | id: artImage; | 80 | id: artImage; |
268 | 92 | objectName: "artImage"; | 81 | objectName: "artImage"; |
269 | 93 | 82 | ||
270 | === modified file 'tests/plugins/Dash/cardcreator/12.res' | |||
271 | --- tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:55:24 +0000 | |||
272 | +++ tests/plugins/Dash/cardcreator/12.res 2016-06-02 08:10:42 +0000 | |||
273 | @@ -4,12 +4,12 @@ | |||
274 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
275 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
276 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
277 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
278 | 8 | property bool showHeader: true; | ||
279 | 9 | implicitWidth: childrenRect.width; | ||
280 | 10 | enabled: true; | ||
281 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
282 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
283 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
284 | 10 | property bool showHeader: true; | ||
285 | 11 | implicitWidth: childrenRect.width; | ||
286 | 12 | enabled: true; | ||
287 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
288 | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
289 | 15 | Item { | 15 | Item { |
290 | 16 | 16 | ||
291 | === modified file 'tests/plugins/Dash/cardcreator/12.res.cardcreator' | |||
292 | --- tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:55:24 +0000 | |||
293 | +++ tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
294 | @@ -4,7 +4,6 @@ | |||
295 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
296 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
297 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
298 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
299 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
300 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
301 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
302 | @@ -13,8 +12,8 @@ | |||
303 | 13 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 12 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
304 | 14 | Item { | 13 | Item { |
305 | 15 | id: artShapeHolder; | 14 | id: artShapeHolder; |
308 | 16 | height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; | 15 | height: artShapeLoader.height; |
309 | 17 | width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; | 16 | width: artShapeLoader.width; |
310 | 18 | anchors { horizontalCenter: parent.horizontalCenter; } | 17 | anchors { horizontalCenter: parent.horizontalCenter; } |
311 | 19 | Loader { | 18 | Loader { |
312 | 20 | id: artShapeLoader; | 19 | id: artShapeLoader; |
313 | @@ -36,19 +35,9 @@ | |||
314 | 36 | radius: "medium"; | 35 | radius: "medium"; |
315 | 37 | aspect: UbuntuShape.Flat; | 36 | aspect: UbuntuShape.Flat; |
316 | 38 | } | 37 | } |
330 | 39 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; | 38 | readonly property real aspect: 0.75; |
331 | 40 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75; | 39 | width: image.status !== Image.Ready ? 0 : image.width; |
332 | 41 | Component.onCompleted: { updateWidthHeightBindings(); } | 40 | height: image.status !== Image.Ready ? 0 : image.height; |
320 | 42 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } | ||
321 | 43 | function updateWidthHeightBindings() { | ||
322 | 44 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { | ||
323 | 45 | width = root.fixedArtShapeSize.width; | ||
324 | 46 | height = root.fixedArtShapeSize.height; | ||
325 | 47 | } else { | ||
326 | 48 | width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); | ||
327 | 49 | height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); | ||
328 | 50 | } | ||
329 | 51 | } | ||
333 | 52 | CroppedImageMinimumSourceSize { | 41 | CroppedImageMinimumSourceSize { |
334 | 53 | id: artImage; | 42 | id: artImage; |
335 | 54 | objectName: "artImage"; | 43 | objectName: "artImage"; |
336 | 55 | 44 | ||
337 | === modified file 'tests/plugins/Dash/cardcreator/2.res' | |||
338 | --- tests/plugins/Dash/cardcreator/2.res 2016-05-09 08:34:38 +0000 | |||
339 | +++ tests/plugins/Dash/cardcreator/2.res 2016-06-02 08:10:42 +0000 | |||
340 | @@ -4,12 +4,12 @@ | |||
341 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
342 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
343 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
344 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
345 | 8 | property bool showHeader: true; | ||
346 | 9 | implicitWidth: childrenRect.width; | ||
347 | 10 | enabled: true; | ||
348 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
349 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
350 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
351 | 10 | property bool showHeader: true; | ||
352 | 11 | implicitWidth: childrenRect.width; | ||
353 | 12 | enabled: true; | ||
354 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
355 | 14 | Loader { | 14 | Loader { |
356 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
357 | 16 | 16 | ||
358 | === modified file 'tests/plugins/Dash/cardcreator/2.res.cardcreator' | |||
359 | --- tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
360 | +++ tests/plugins/Dash/cardcreator/2.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
361 | @@ -4,7 +4,6 @@ | |||
362 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
363 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
364 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
365 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
366 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
367 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
368 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
369 | 11 | 10 | ||
370 | === modified file 'tests/plugins/Dash/cardcreator/3.res' | |||
371 | --- tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:55:24 +0000 | |||
372 | +++ tests/plugins/Dash/cardcreator/3.res 2016-06-02 08:10:42 +0000 | |||
373 | @@ -4,12 +4,12 @@ | |||
374 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
375 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
376 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
377 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
378 | 8 | property bool showHeader: true; | ||
379 | 9 | implicitWidth: childrenRect.width; | ||
380 | 10 | enabled: true; | ||
381 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
382 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
383 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
384 | 10 | property bool showHeader: true; | ||
385 | 11 | implicitWidth: childrenRect.width; | ||
386 | 12 | enabled: true; | ||
387 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
388 | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
389 | 15 | Item { | 15 | Item { |
390 | 16 | 16 | ||
391 | === modified file 'tests/plugins/Dash/cardcreator/3.res.cardcreator' | |||
392 | --- tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:55:24 +0000 | |||
393 | +++ tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
394 | @@ -4,7 +4,6 @@ | |||
395 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
396 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
397 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
398 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
399 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
400 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
401 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
402 | @@ -13,8 +12,8 @@ | |||
403 | 13 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 12 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
404 | 14 | Item { | 13 | Item { |
405 | 15 | id: artShapeHolder; | 14 | id: artShapeHolder; |
408 | 16 | height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; | 15 | height: artShapeLoader.height; |
409 | 17 | width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; | 16 | width: artShapeLoader.width; |
410 | 18 | anchors { horizontalCenter: parent.horizontalCenter; } | 17 | anchors { horizontalCenter: parent.horizontalCenter; } |
411 | 19 | Loader { | 18 | Loader { |
412 | 20 | id: artShapeLoader; | 19 | id: artShapeLoader; |
413 | @@ -34,19 +33,9 @@ | |||
414 | 34 | source: artImage; | 33 | source: artImage; |
415 | 35 | aspect: UbuntuShape.DropShadow; | 34 | aspect: UbuntuShape.DropShadow; |
416 | 36 | } | 35 | } |
430 | 37 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; | 36 | readonly property real aspect: 0.75; |
431 | 38 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75; | 37 | width: image.status !== Image.Ready ? 0 : image.width; |
432 | 39 | Component.onCompleted: { updateWidthHeightBindings(); } | 38 | height: image.status !== Image.Ready ? 0 : image.height; |
420 | 40 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } | ||
421 | 41 | function updateWidthHeightBindings() { | ||
422 | 42 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { | ||
423 | 43 | width = root.fixedArtShapeSize.width; | ||
424 | 44 | height = root.fixedArtShapeSize.height; | ||
425 | 45 | } else { | ||
426 | 46 | width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); | ||
427 | 47 | height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); | ||
428 | 48 | } | ||
429 | 49 | } | ||
433 | 50 | CroppedImageMinimumSourceSize { | 39 | CroppedImageMinimumSourceSize { |
434 | 51 | id: artImage; | 40 | id: artImage; |
435 | 52 | objectName: "artImage"; | 41 | objectName: "artImage"; |
436 | 53 | 42 | ||
437 | === modified file 'tests/plugins/Dash/cardcreator/4.res' | |||
438 | --- tests/plugins/Dash/cardcreator/4.res 2016-05-09 08:34:38 +0000 | |||
439 | +++ tests/plugins/Dash/cardcreator/4.res 2016-06-02 08:10:42 +0000 | |||
440 | @@ -4,12 +4,12 @@ | |||
441 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
442 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
443 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
444 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
445 | 8 | property bool showHeader: true; | ||
446 | 9 | implicitWidth: childrenRect.width; | ||
447 | 10 | enabled: true; | ||
448 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
449 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
450 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
451 | 10 | property bool showHeader: true; | ||
452 | 11 | implicitWidth: childrenRect.width; | ||
453 | 12 | enabled: true; | ||
454 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
455 | 14 | readonly property size artShapeSize: Qt.size(-1, -1); | 14 | readonly property size artShapeSize: Qt.size(-1, -1); |
456 | 15 | readonly property int headerHeight: row.height; | 15 | readonly property int headerHeight: row.height; |
457 | 16 | 16 | ||
458 | === modified file 'tests/plugins/Dash/cardcreator/4.res.cardcreator' | |||
459 | --- tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
460 | +++ tests/plugins/Dash/cardcreator/4.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
461 | @@ -4,7 +4,6 @@ | |||
462 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
463 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
464 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
465 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
466 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
467 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
468 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
469 | 11 | 10 | ||
470 | === modified file 'tests/plugins/Dash/cardcreator/5.res' | |||
471 | --- tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:55:24 +0000 | |||
472 | +++ tests/plugins/Dash/cardcreator/5.res 2016-06-02 08:10:42 +0000 | |||
473 | @@ -4,12 +4,12 @@ | |||
474 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
475 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
476 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
477 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
478 | 8 | property bool showHeader: true; | ||
479 | 9 | implicitWidth: childrenRect.width; | ||
480 | 10 | enabled: false; | ||
481 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
482 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
483 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
484 | 10 | property bool showHeader: true; | ||
485 | 11 | implicitWidth: childrenRect.width; | ||
486 | 12 | enabled: false; | ||
487 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
488 | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 14 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
489 | 15 | Item { | 15 | Item { |
490 | 16 | 16 | ||
491 | === modified file 'tests/plugins/Dash/cardcreator/5.res.cardcreator' | |||
492 | --- tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:55:24 +0000 | |||
493 | +++ tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
494 | @@ -4,7 +4,6 @@ | |||
495 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
496 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
497 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
498 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
499 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
500 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
501 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
502 | @@ -13,8 +12,8 @@ | |||
503 | 13 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 12 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
504 | 14 | Item { | 13 | Item { |
505 | 15 | id: artShapeHolder; | 14 | id: artShapeHolder; |
508 | 16 | height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; | 15 | height: artShapeLoader.height; |
509 | 17 | width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; | 16 | width: artShapeLoader.width; |
510 | 18 | anchors { horizontalCenter: parent.horizontalCenter; } | 17 | anchors { horizontalCenter: parent.horizontalCenter; } |
511 | 19 | Loader { | 18 | Loader { |
512 | 20 | id: artShapeLoader; | 19 | id: artShapeLoader; |
513 | @@ -29,19 +28,9 @@ | |||
514 | 29 | objectName: "artShape"; | 28 | objectName: "artShape"; |
515 | 30 | visible: image.status == Image.Ready; | 29 | visible: image.status == Image.Ready; |
516 | 31 | readonly property alias image: artImage; | 30 | readonly property alias image: artImage; |
530 | 32 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; | 31 | readonly property real aspect: 1; |
531 | 33 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1; | 32 | width: image.status !== Image.Ready ? 0 : image.width; |
532 | 34 | Component.onCompleted: { updateWidthHeightBindings(); } | 33 | height: image.status !== Image.Ready ? 0 : image.height; |
520 | 35 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } | ||
521 | 36 | function updateWidthHeightBindings() { | ||
522 | 37 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { | ||
523 | 38 | width = root.fixedArtShapeSize.width; | ||
524 | 39 | height = root.fixedArtShapeSize.height; | ||
525 | 40 | } else { | ||
526 | 41 | width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); | ||
527 | 42 | height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); | ||
528 | 43 | } | ||
529 | 44 | } | ||
533 | 45 | CroppedImageMinimumSourceSize { | 34 | CroppedImageMinimumSourceSize { |
534 | 46 | id: artImage; | 35 | id: artImage; |
535 | 47 | objectName: "artImage"; | 36 | objectName: "artImage"; |
536 | 48 | 37 | ||
537 | === modified file 'tests/plugins/Dash/cardcreator/6.res' | |||
538 | --- tests/plugins/Dash/cardcreator/6.res 2016-05-09 08:34:38 +0000 | |||
539 | +++ tests/plugins/Dash/cardcreator/6.res 2016-06-02 08:10:42 +0000 | |||
540 | @@ -4,12 +4,12 @@ | |||
541 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
542 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
543 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
544 | 7 | property int fixedHeaderHeight: -1; | ||
545 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
546 | 9 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
547 | 10 | property bool showHeader: true; | 8 | property bool showHeader: true; |
548 | 11 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
549 | 12 | enabled: true; | 10 | enabled: true; |
550 | 11 | property int fixedHeaderHeight: -1; | ||
551 | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
552 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
553 | 14 | Loader { | 14 | Loader { |
554 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
555 | 16 | 16 | ||
556 | === modified file 'tests/plugins/Dash/cardcreator/6.res.cardcreator' | |||
557 | --- tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
558 | +++ tests/plugins/Dash/cardcreator/6.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
559 | @@ -4,7 +4,6 @@ | |||
560 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
561 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
562 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
563 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
564 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
565 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
566 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
567 | 11 | 10 | ||
568 | === modified file 'tests/plugins/Dash/cardcreator/7.res' | |||
569 | --- tests/plugins/Dash/cardcreator/7.res 2016-05-09 08:34:38 +0000 | |||
570 | +++ tests/plugins/Dash/cardcreator/7.res 2016-06-02 08:10:42 +0000 | |||
571 | @@ -4,12 +4,12 @@ | |||
572 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
573 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
574 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
575 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
576 | 8 | property bool showHeader: true; | ||
577 | 9 | implicitWidth: childrenRect.width; | ||
578 | 10 | enabled: true; | ||
579 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
580 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
581 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
582 | 10 | property bool showHeader: true; | ||
583 | 11 | implicitWidth: childrenRect.width; | ||
584 | 12 | enabled: true; | ||
585 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
586 | 14 | Loader { | 14 | Loader { |
587 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
588 | 16 | 16 | ||
589 | === modified file 'tests/plugins/Dash/cardcreator/7.res.cardcreator' | |||
590 | --- tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
591 | +++ tests/plugins/Dash/cardcreator/7.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
592 | @@ -4,7 +4,6 @@ | |||
593 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
594 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
595 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
596 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
597 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
598 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
599 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
600 | 11 | 10 | ||
601 | === modified file 'tests/plugins/Dash/cardcreator/8.res' | |||
602 | --- tests/plugins/Dash/cardcreator/8.res 2016-05-09 08:34:38 +0000 | |||
603 | +++ tests/plugins/Dash/cardcreator/8.res 2016-06-02 08:10:42 +0000 | |||
604 | @@ -4,12 +4,12 @@ | |||
605 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
606 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
607 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
608 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
609 | 8 | property bool showHeader: true; | ||
610 | 9 | implicitWidth: childrenRect.width; | ||
611 | 10 | enabled: true; | ||
612 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
613 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
614 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
615 | 10 | property bool showHeader: true; | ||
616 | 11 | implicitWidth: childrenRect.width; | ||
617 | 12 | enabled: true; | ||
618 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
619 | 14 | Loader { | 14 | Loader { |
620 | 15 | id: backgroundLoader; | 15 | id: backgroundLoader; |
621 | 16 | 16 | ||
622 | === modified file 'tests/plugins/Dash/cardcreator/8.res.cardcreator' | |||
623 | --- tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
624 | +++ tests/plugins/Dash/cardcreator/8.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
625 | @@ -4,7 +4,6 @@ | |||
626 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
627 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
628 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
629 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
630 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
631 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
632 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
633 | 11 | 10 | ||
634 | === modified file 'tests/plugins/Dash/cardcreator/9.res' | |||
635 | --- tests/plugins/Dash/cardcreator/9.res 2016-05-09 08:34:38 +0000 | |||
636 | +++ tests/plugins/Dash/cardcreator/9.res 2016-06-02 08:10:42 +0000 | |||
637 | @@ -4,12 +4,12 @@ | |||
638 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
639 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
640 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
641 | 7 | readonly property string title: cardData && cardData["title"] || ""; | ||
642 | 8 | property bool showHeader: true; | ||
643 | 9 | implicitWidth: childrenRect.width; | ||
644 | 10 | enabled: true; | ||
645 | 7 | property int fixedHeaderHeight: -1; | 11 | property int fixedHeaderHeight: -1; |
646 | 8 | property size fixedArtShapeSize: Qt.size(-1, -1); | 12 | property size fixedArtShapeSize: Qt.size(-1, -1); |
647 | 9 | readonly property string title: cardData && cardData["title"] || ""; | ||
648 | 10 | property bool showHeader: true; | ||
649 | 11 | implicitWidth: childrenRect.width; | ||
650 | 12 | enabled: true; | ||
651 | 13 | signal action(var actionId); | 13 | signal action(var actionId); |
652 | 14 | readonly property size artShapeSize: Qt.size(-1, -1); | 14 | readonly property size artShapeSize: Qt.size(-1, -1); |
653 | 15 | readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin; | 15 | readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin; |
654 | 16 | 16 | ||
655 | === modified file 'tests/plugins/Dash/cardcreator/9.res.cardcreator' | |||
656 | --- tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-05-09 08:34:38 +0000 | |||
657 | +++ tests/plugins/Dash/cardcreator/9.res.cardcreator 2016-06-02 08:10:42 +0000 | |||
658 | @@ -4,7 +4,6 @@ | |||
659 | 4 | property string backgroundShapeStyle: "inset"; | 4 | property string backgroundShapeStyle: "inset"; |
660 | 5 | property real fontScale: 1.0; | 5 | property real fontScale: 1.0; |
661 | 6 | property var scopeStyle: null; | 6 | property var scopeStyle: null; |
662 | 7 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
663 | 8 | readonly property string title: cardData && cardData["title"] || ""; | 7 | readonly property string title: cardData && cardData["title"] || ""; |
664 | 9 | property bool showHeader: true; | 8 | property bool showHeader: true; |
665 | 10 | implicitWidth: childrenRect.width; | 9 | implicitWidth: childrenRect.width; |
FAILED: Continuous integration, rev:2218 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/1267/ /unity8- jenkins. ubuntu. com/job/ build-0- fetch/1709 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1659 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1659 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1652/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1652 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1652/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1652/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1652 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1652/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1652/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1652 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1652/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/1267/ rebuild
https:/