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 | } \n\ |
6 | }\n'; |
7 | |
8 | +// %1 is used as anchors of artShapeHolder |
9 | +// %2 is used as image width |
10 | +// %3 is used as image height |
11 | +// %4 is whether the image should be visible |
12 | +// %5 is used as aspect ratio |
13 | +// %6 is whether the loader should be asynchronous or not |
14 | +// %7 is the shape code we want to use |
15 | +// %8 is injected as code to artImage |
16 | +// %9 is used as image fallback |
17 | +var kArtShapeHolderCodeCardToolCard = 'Item { \n\ |
18 | + id: artShapeHolder; \n\ |
19 | + height: artShapeLoader.height; \n\ |
20 | + width: artShapeLoader.width; \n\ |
21 | + anchors { %1 } \n\ |
22 | + Loader { \n\ |
23 | + id: artShapeLoader; \n\ |
24 | + objectName: "artShapeLoader"; \n\ |
25 | + readonly property string cardArt: cardData && cardData["art"] || %9; \n\ |
26 | + onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\ |
27 | + active: cardArt != ""; \n\ |
28 | + asynchronous: %6; \n\ |
29 | + visible: status == Loader.Ready; \n\ |
30 | + sourceComponent: Item { \n\ |
31 | + id: artShape; \n\ |
32 | + objectName: "artShape"; \n\ |
33 | + visible: image.status == Image.Ready; \n\ |
34 | + readonly property alias image: artImage; \n\ |
35 | + %7 \n\ |
36 | + readonly property real aspect: %5; \n\ |
37 | + width: image.status !== Image.Ready ? 0 : image.width; \n\ |
38 | + height: image.status !== Image.Ready ? 0 : image.height; \n\ |
39 | + CroppedImageMinimumSourceSize { \n\ |
40 | + id: artImage; \n\ |
41 | + objectName: "artImage"; \n\ |
42 | + source: artShapeLoader.cardArt; \n\ |
43 | + asynchronous: %6; \n\ |
44 | + visible: %4; \n\ |
45 | + width: %2; \n\ |
46 | + height: %3; \n\ |
47 | + %8 \n\ |
48 | + } \n\ |
49 | + } \n\ |
50 | + } \n\ |
51 | + }\n'; |
52 | + |
53 | // %1 is anchors.fill |
54 | // %2 is width |
55 | // %3 is height |
56 | @@ -416,15 +461,16 @@ |
57 | property string backgroundShapeStyle: "inset"; \n\ |
58 | property real fontScale: 1.0; \n\ |
59 | property var scopeStyle: null; \n\ |
60 | - %2\ |
61 | - property size fixedArtShapeSize: Qt.size(-1, -1); \n\ |
62 | readonly property string title: cardData && cardData["title"] || ""; \n\ |
63 | property bool showHeader: true; \n\ |
64 | implicitWidth: childrenRect.width; \n\ |
65 | enabled: %1; \n\ |
66 | \n'.arg(templateInteractive); |
67 | |
68 | - code = code.arg(isCardTool ? "" : "property int fixedHeaderHeight: -1; \n"); |
69 | + if (!isCardTool) { |
70 | + code += "property int fixedHeaderHeight: -1; \n\ |
71 | + property size fixedArtShapeSize: Qt.size(-1, -1); \n"; |
72 | + } |
73 | |
74 | var hasArt = components["art"] && components["art"]["field"] || false; |
75 | var hasSummary = components["summary"] || false; |
76 | @@ -533,15 +579,16 @@ |
77 | } else { |
78 | artShapeHolderShapeCode = ""; |
79 | } |
80 | - code += kArtShapeHolderCode.arg(artAnchors) |
81 | - .arg(widthCode) |
82 | - .arg(heightCode) |
83 | - .arg(isConciergeMode ? "true" : "false") |
84 | - .arg(aspectRatio) |
85 | - .arg(asynchronous) |
86 | - .arg(artShapeHolderShapeCode) |
87 | - .arg(fallbackStatusCode) |
88 | - .arg(fallbackURICode); |
89 | + var artShapeHolderCode = isCardTool ? kArtShapeHolderCodeCardToolCard : kArtShapeHolderCode; |
90 | + code += artShapeHolderCode.arg(artAnchors) |
91 | + .arg(widthCode) |
92 | + .arg(heightCode) |
93 | + .arg(isConciergeMode ? "true" : "false") |
94 | + .arg(aspectRatio) |
95 | + .arg(asynchronous) |
96 | + .arg(artShapeHolderShapeCode) |
97 | + .arg(fallbackStatusCode) |
98 | + .arg(fallbackURICode); |
99 | } else { |
100 | code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n' |
101 | } |
102 | |
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 | property string backgroundShapeStyle: "inset"; |
108 | property real fontScale: 1.0; |
109 | property var scopeStyle: null; |
110 | + readonly property string title: cardData && cardData["title"] || ""; |
111 | + property bool showHeader: true; |
112 | + implicitWidth: childrenRect.width; |
113 | + enabled: true; |
114 | property int fixedHeaderHeight: -1; |
115 | property size fixedArtShapeSize: Qt.size(-1, -1); |
116 | - readonly property string title: cardData && cardData["title"] || ""; |
117 | - property bool showHeader: true; |
118 | - implicitWidth: childrenRect.width; |
119 | - enabled: true; |
120 | signal action(var actionId); |
121 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
122 | Item { |
123 | |
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 | property string backgroundShapeStyle: "inset"; |
129 | property real fontScale: 1.0; |
130 | property var scopeStyle: null; |
131 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
132 | readonly property string title: cardData && cardData["title"] || ""; |
133 | property bool showHeader: true; |
134 | implicitWidth: childrenRect.width; |
135 | @@ -13,8 +12,8 @@ |
136 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
137 | Item { |
138 | id: artShapeHolder; |
139 | - height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; |
140 | - width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; |
141 | + height: artShapeLoader.height; |
142 | + width: artShapeLoader.width; |
143 | anchors { horizontalCenter: parent.horizontalCenter; } |
144 | Loader { |
145 | id: artShapeLoader; |
146 | @@ -36,19 +35,9 @@ |
147 | radius: "medium"; |
148 | aspect: UbuntuShape.Inset; |
149 | } |
150 | - readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
151 | - readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1.6; |
152 | - Component.onCompleted: { updateWidthHeightBindings(); } |
153 | - Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
154 | - function updateWidthHeightBindings() { |
155 | - if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
156 | - width = root.fixedArtShapeSize.width; |
157 | - height = root.fixedArtShapeSize.height; |
158 | - } else { |
159 | - width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); |
160 | - height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); |
161 | - } |
162 | - } |
163 | + readonly property real aspect: 1.6; |
164 | + width: image.status !== Image.Ready ? 0 : image.width; |
165 | + height: image.status !== Image.Ready ? 0 : image.height; |
166 | CroppedImageMinimumSourceSize { |
167 | id: artImage; |
168 | objectName: "artImage"; |
169 | |
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 | property string backgroundShapeStyle: "inset"; |
175 | property real fontScale: 1.0; |
176 | property var scopeStyle: null; |
177 | + readonly property string title: cardData && cardData["title"] || ""; |
178 | + property bool showHeader: true; |
179 | + implicitWidth: childrenRect.width; |
180 | + enabled: true; |
181 | property int fixedHeaderHeight: -1; |
182 | property size fixedArtShapeSize: Qt.size(-1, -1); |
183 | - readonly property string title: cardData && cardData["title"] || ""; |
184 | - property bool showHeader: true; |
185 | - implicitWidth: childrenRect.width; |
186 | - enabled: true; |
187 | signal action(var actionId); |
188 | Loader { |
189 | id: backgroundLoader; |
190 | |
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 | property string backgroundShapeStyle: "inset"; |
196 | property real fontScale: 1.0; |
197 | property var scopeStyle: null; |
198 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
199 | readonly property string title: cardData && cardData["title"] || ""; |
200 | property bool showHeader: true; |
201 | implicitWidth: childrenRect.width; |
202 | |
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 | property string backgroundShapeStyle: "inset"; |
208 | property real fontScale: 1.0; |
209 | property var scopeStyle: null; |
210 | + readonly property string title: cardData && cardData["title"] || ""; |
211 | + property bool showHeader: true; |
212 | + implicitWidth: childrenRect.width; |
213 | + enabled: true; |
214 | property int fixedHeaderHeight: -1; |
215 | property size fixedArtShapeSize: Qt.size(-1, -1); |
216 | - readonly property string title: cardData && cardData["title"] || ""; |
217 | - property bool showHeader: true; |
218 | - implicitWidth: childrenRect.width; |
219 | - enabled: true; |
220 | signal action(var actionId); |
221 | Loader { |
222 | id: backgroundLoader; |
223 | |
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 | property string backgroundShapeStyle: "inset"; |
229 | property real fontScale: 1.0; |
230 | property var scopeStyle: null; |
231 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
232 | readonly property string title: cardData && cardData["title"] || ""; |
233 | property bool showHeader: true; |
234 | implicitWidth: childrenRect.width; |
235 | @@ -51,8 +50,8 @@ |
236 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
237 | Item { |
238 | id: artShapeHolder; |
239 | - height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; |
240 | - width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; |
241 | + height: artShapeLoader.height; |
242 | + width: artShapeLoader.width; |
243 | anchors { horizontalCenter: parent.horizontalCenter; } |
244 | Loader { |
245 | id: artShapeLoader; |
246 | @@ -74,19 +73,9 @@ |
247 | radius: "medium"; |
248 | aspect: UbuntuShape.Flat; |
249 | } |
250 | - readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
251 | - readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1; |
252 | - Component.onCompleted: { updateWidthHeightBindings(); } |
253 | - Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
254 | - function updateWidthHeightBindings() { |
255 | - if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
256 | - width = root.fixedArtShapeSize.width; |
257 | - height = root.fixedArtShapeSize.height; |
258 | - } else { |
259 | - width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); |
260 | - height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); |
261 | - } |
262 | - } |
263 | + readonly property real aspect: 1; |
264 | + width: image.status !== Image.Ready ? 0 : image.width; |
265 | + height: image.status !== Image.Ready ? 0 : image.height; |
266 | CroppedImageMinimumSourceSize { |
267 | id: artImage; |
268 | objectName: "artImage"; |
269 | |
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 | property string backgroundShapeStyle: "inset"; |
275 | property real fontScale: 1.0; |
276 | property var scopeStyle: null; |
277 | + readonly property string title: cardData && cardData["title"] || ""; |
278 | + property bool showHeader: true; |
279 | + implicitWidth: childrenRect.width; |
280 | + enabled: true; |
281 | property int fixedHeaderHeight: -1; |
282 | property size fixedArtShapeSize: Qt.size(-1, -1); |
283 | - readonly property string title: cardData && cardData["title"] || ""; |
284 | - property bool showHeader: true; |
285 | - implicitWidth: childrenRect.width; |
286 | - enabled: true; |
287 | signal action(var actionId); |
288 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
289 | Item { |
290 | |
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 | property string backgroundShapeStyle: "inset"; |
296 | property real fontScale: 1.0; |
297 | property var scopeStyle: null; |
298 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
299 | readonly property string title: cardData && cardData["title"] || ""; |
300 | property bool showHeader: true; |
301 | implicitWidth: childrenRect.width; |
302 | @@ -13,8 +12,8 @@ |
303 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
304 | Item { |
305 | id: artShapeHolder; |
306 | - height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; |
307 | - width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; |
308 | + height: artShapeLoader.height; |
309 | + width: artShapeLoader.width; |
310 | anchors { horizontalCenter: parent.horizontalCenter; } |
311 | Loader { |
312 | id: artShapeLoader; |
313 | @@ -36,19 +35,9 @@ |
314 | radius: "medium"; |
315 | aspect: UbuntuShape.Flat; |
316 | } |
317 | - readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
318 | - readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75; |
319 | - Component.onCompleted: { updateWidthHeightBindings(); } |
320 | - Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
321 | - function updateWidthHeightBindings() { |
322 | - if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
323 | - width = root.fixedArtShapeSize.width; |
324 | - height = root.fixedArtShapeSize.height; |
325 | - } else { |
326 | - width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); |
327 | - height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); |
328 | - } |
329 | - } |
330 | + readonly property real aspect: 0.75; |
331 | + width: image.status !== Image.Ready ? 0 : image.width; |
332 | + height: image.status !== Image.Ready ? 0 : image.height; |
333 | CroppedImageMinimumSourceSize { |
334 | id: artImage; |
335 | objectName: "artImage"; |
336 | |
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 | property string backgroundShapeStyle: "inset"; |
342 | property real fontScale: 1.0; |
343 | property var scopeStyle: null; |
344 | + readonly property string title: cardData && cardData["title"] || ""; |
345 | + property bool showHeader: true; |
346 | + implicitWidth: childrenRect.width; |
347 | + enabled: true; |
348 | property int fixedHeaderHeight: -1; |
349 | property size fixedArtShapeSize: Qt.size(-1, -1); |
350 | - readonly property string title: cardData && cardData["title"] || ""; |
351 | - property bool showHeader: true; |
352 | - implicitWidth: childrenRect.width; |
353 | - enabled: true; |
354 | signal action(var actionId); |
355 | Loader { |
356 | id: backgroundLoader; |
357 | |
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 | property string backgroundShapeStyle: "inset"; |
363 | property real fontScale: 1.0; |
364 | property var scopeStyle: null; |
365 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
366 | readonly property string title: cardData && cardData["title"] || ""; |
367 | property bool showHeader: true; |
368 | implicitWidth: childrenRect.width; |
369 | |
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 | property string backgroundShapeStyle: "inset"; |
375 | property real fontScale: 1.0; |
376 | property var scopeStyle: null; |
377 | + readonly property string title: cardData && cardData["title"] || ""; |
378 | + property bool showHeader: true; |
379 | + implicitWidth: childrenRect.width; |
380 | + enabled: true; |
381 | property int fixedHeaderHeight: -1; |
382 | property size fixedArtShapeSize: Qt.size(-1, -1); |
383 | - readonly property string title: cardData && cardData["title"] || ""; |
384 | - property bool showHeader: true; |
385 | - implicitWidth: childrenRect.width; |
386 | - enabled: true; |
387 | signal action(var actionId); |
388 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
389 | Item { |
390 | |
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 | property string backgroundShapeStyle: "inset"; |
396 | property real fontScale: 1.0; |
397 | property var scopeStyle: null; |
398 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
399 | readonly property string title: cardData && cardData["title"] || ""; |
400 | property bool showHeader: true; |
401 | implicitWidth: childrenRect.width; |
402 | @@ -13,8 +12,8 @@ |
403 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
404 | Item { |
405 | id: artShapeHolder; |
406 | - height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; |
407 | - width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; |
408 | + height: artShapeLoader.height; |
409 | + width: artShapeLoader.width; |
410 | anchors { horizontalCenter: parent.horizontalCenter; } |
411 | Loader { |
412 | id: artShapeLoader; |
413 | @@ -34,19 +33,9 @@ |
414 | source: artImage; |
415 | aspect: UbuntuShape.DropShadow; |
416 | } |
417 | - readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
418 | - readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 0.75; |
419 | - Component.onCompleted: { updateWidthHeightBindings(); } |
420 | - Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
421 | - function updateWidthHeightBindings() { |
422 | - if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
423 | - width = root.fixedArtShapeSize.width; |
424 | - height = root.fixedArtShapeSize.height; |
425 | - } else { |
426 | - width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); |
427 | - height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); |
428 | - } |
429 | - } |
430 | + readonly property real aspect: 0.75; |
431 | + width: image.status !== Image.Ready ? 0 : image.width; |
432 | + height: image.status !== Image.Ready ? 0 : image.height; |
433 | CroppedImageMinimumSourceSize { |
434 | id: artImage; |
435 | objectName: "artImage"; |
436 | |
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 | property string backgroundShapeStyle: "inset"; |
442 | property real fontScale: 1.0; |
443 | property var scopeStyle: null; |
444 | + readonly property string title: cardData && cardData["title"] || ""; |
445 | + property bool showHeader: true; |
446 | + implicitWidth: childrenRect.width; |
447 | + enabled: true; |
448 | property int fixedHeaderHeight: -1; |
449 | property size fixedArtShapeSize: Qt.size(-1, -1); |
450 | - readonly property string title: cardData && cardData["title"] || ""; |
451 | - property bool showHeader: true; |
452 | - implicitWidth: childrenRect.width; |
453 | - enabled: true; |
454 | signal action(var actionId); |
455 | readonly property size artShapeSize: Qt.size(-1, -1); |
456 | readonly property int headerHeight: row.height; |
457 | |
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 | property string backgroundShapeStyle: "inset"; |
463 | property real fontScale: 1.0; |
464 | property var scopeStyle: null; |
465 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
466 | readonly property string title: cardData && cardData["title"] || ""; |
467 | property bool showHeader: true; |
468 | implicitWidth: childrenRect.width; |
469 | |
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 | property string backgroundShapeStyle: "inset"; |
475 | property real fontScale: 1.0; |
476 | property var scopeStyle: null; |
477 | + readonly property string title: cardData && cardData["title"] || ""; |
478 | + property bool showHeader: true; |
479 | + implicitWidth: childrenRect.width; |
480 | + enabled: false; |
481 | property int fixedHeaderHeight: -1; |
482 | property size fixedArtShapeSize: Qt.size(-1, -1); |
483 | - readonly property string title: cardData && cardData["title"] || ""; |
484 | - property bool showHeader: true; |
485 | - implicitWidth: childrenRect.width; |
486 | - enabled: false; |
487 | signal action(var actionId); |
488 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
489 | Item { |
490 | |
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 | property string backgroundShapeStyle: "inset"; |
496 | property real fontScale: 1.0; |
497 | property var scopeStyle: null; |
498 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
499 | readonly property string title: cardData && cardData["title"] || ""; |
500 | property bool showHeader: true; |
501 | implicitWidth: childrenRect.width; |
502 | @@ -13,8 +12,8 @@ |
503 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
504 | Item { |
505 | id: artShapeHolder; |
506 | - height: root.fixedArtShapeSize.height > 0 ? root.fixedArtShapeSize.height : artShapeLoader.height; |
507 | - width: root.fixedArtShapeSize.width > 0 ? root.fixedArtShapeSize.width : artShapeLoader.width; |
508 | + height: artShapeLoader.height; |
509 | + width: artShapeLoader.width; |
510 | anchors { horizontalCenter: parent.horizontalCenter; } |
511 | Loader { |
512 | id: artShapeLoader; |
513 | @@ -29,19 +28,9 @@ |
514 | objectName: "artShape"; |
515 | visible: image.status == Image.Ready; |
516 | readonly property alias image: artImage; |
517 | - readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
518 | - readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1; |
519 | - Component.onCompleted: { updateWidthHeightBindings(); } |
520 | - Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
521 | - function updateWidthHeightBindings() { |
522 | - if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
523 | - width = root.fixedArtShapeSize.width; |
524 | - height = root.fixedArtShapeSize.height; |
525 | - } else { |
526 | - width = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.width }); |
527 | - height = Qt.binding(function() { return image.status !== Image.Ready ? 0 : image.height }); |
528 | - } |
529 | - } |
530 | + readonly property real aspect: 1; |
531 | + width: image.status !== Image.Ready ? 0 : image.width; |
532 | + height: image.status !== Image.Ready ? 0 : image.height; |
533 | CroppedImageMinimumSourceSize { |
534 | id: artImage; |
535 | objectName: "artImage"; |
536 | |
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 | property string backgroundShapeStyle: "inset"; |
542 | property real fontScale: 1.0; |
543 | property var scopeStyle: null; |
544 | - property int fixedHeaderHeight: -1; |
545 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
546 | readonly property string title: cardData && cardData["title"] || ""; |
547 | property bool showHeader: true; |
548 | implicitWidth: childrenRect.width; |
549 | enabled: true; |
550 | + property int fixedHeaderHeight: -1; |
551 | + property size fixedArtShapeSize: Qt.size(-1, -1); |
552 | signal action(var actionId); |
553 | Loader { |
554 | id: backgroundLoader; |
555 | |
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 | property string backgroundShapeStyle: "inset"; |
561 | property real fontScale: 1.0; |
562 | property var scopeStyle: null; |
563 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
564 | readonly property string title: cardData && cardData["title"] || ""; |
565 | property bool showHeader: true; |
566 | implicitWidth: childrenRect.width; |
567 | |
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 | property string backgroundShapeStyle: "inset"; |
573 | property real fontScale: 1.0; |
574 | property var scopeStyle: null; |
575 | + readonly property string title: cardData && cardData["title"] || ""; |
576 | + property bool showHeader: true; |
577 | + implicitWidth: childrenRect.width; |
578 | + enabled: true; |
579 | property int fixedHeaderHeight: -1; |
580 | property size fixedArtShapeSize: Qt.size(-1, -1); |
581 | - readonly property string title: cardData && cardData["title"] || ""; |
582 | - property bool showHeader: true; |
583 | - implicitWidth: childrenRect.width; |
584 | - enabled: true; |
585 | signal action(var actionId); |
586 | Loader { |
587 | id: backgroundLoader; |
588 | |
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 | property string backgroundShapeStyle: "inset"; |
594 | property real fontScale: 1.0; |
595 | property var scopeStyle: null; |
596 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
597 | readonly property string title: cardData && cardData["title"] || ""; |
598 | property bool showHeader: true; |
599 | implicitWidth: childrenRect.width; |
600 | |
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 | property string backgroundShapeStyle: "inset"; |
606 | property real fontScale: 1.0; |
607 | property var scopeStyle: null; |
608 | + readonly property string title: cardData && cardData["title"] || ""; |
609 | + property bool showHeader: true; |
610 | + implicitWidth: childrenRect.width; |
611 | + enabled: true; |
612 | property int fixedHeaderHeight: -1; |
613 | property size fixedArtShapeSize: Qt.size(-1, -1); |
614 | - readonly property string title: cardData && cardData["title"] || ""; |
615 | - property bool showHeader: true; |
616 | - implicitWidth: childrenRect.width; |
617 | - enabled: true; |
618 | signal action(var actionId); |
619 | Loader { |
620 | id: backgroundLoader; |
621 | |
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 | property string backgroundShapeStyle: "inset"; |
627 | property real fontScale: 1.0; |
628 | property var scopeStyle: null; |
629 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
630 | readonly property string title: cardData && cardData["title"] || ""; |
631 | property bool showHeader: true; |
632 | implicitWidth: childrenRect.width; |
633 | |
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 | property string backgroundShapeStyle: "inset"; |
639 | property real fontScale: 1.0; |
640 | property var scopeStyle: null; |
641 | + readonly property string title: cardData && cardData["title"] || ""; |
642 | + property bool showHeader: true; |
643 | + implicitWidth: childrenRect.width; |
644 | + enabled: true; |
645 | property int fixedHeaderHeight: -1; |
646 | property size fixedArtShapeSize: Qt.size(-1, -1); |
647 | - readonly property string title: cardData && cardData["title"] || ""; |
648 | - property bool showHeader: true; |
649 | - implicitWidth: childrenRect.width; |
650 | - enabled: true; |
651 | signal action(var actionId); |
652 | readonly property size artShapeSize: Qt.size(-1, -1); |
653 | readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin + audioProgressBar.height + audioProgressBar.anchors.topMargin; |
654 | |
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 | property string backgroundShapeStyle: "inset"; |
660 | property real fontScale: 1.0; |
661 | property var scopeStyle: null; |
662 | - property size fixedArtShapeSize: Qt.size(-1, -1); |
663 | readonly property string title: cardData && cardData["title"] || ""; |
664 | property bool showHeader: true; |
665 | 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:/