Merge lp:~cimi/unity8/card_emblems_single_container into lp:unity8
- card_emblems_single_container
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Michał Sawicz |
Proposed branch: | lp:~cimi/unity8/card_emblems_single_container |
Merge into: | lp:unity8 |
Diff against target: |
1046 lines (+524/-286) 11 files modified
plugins/Dash/CardCreator.js (+111/-28) tests/plugins/Dash/cardcreator/1.res (+2/-1) tests/plugins/Dash/cardcreator/2.res (+94/-89) tests/plugins/Dash/cardcreator/3.res (+50/-48) tests/plugins/Dash/cardcreator/4.res (+72/-68) tests/plugins/Dash/cardcreator/5.res (+50/-50) tests/plugins/Dash/cardcreator/6.res (+115/-0) tests/plugins/Dash/cardcreator/6.tst (+3/-0) tests/plugins/Dash/cardcreatortest.cpp (+8/-2) tests/qmltests/Dash/CardHelpers.js (+1/-0) tests/qmltests/Dash/tst_Card.qml (+18/-0) |
To merge this branch: | bzr merge lp:~cimi/unity8/card_emblems_single_container |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Disapprove | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Albert Astals Cid (community) | Needs Fixing | ||
Review via email: mp+223899@code.launchpad.net |
Commit message
Add emblems using a single container
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
No
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* Did you make sure that your branch does not contain spurious tags?
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
- 941. By Andrea Cimitan
-
var rename
PS Jenkins bot (ps-jenkins) wrote : | # |
Ying-Chun Liu (paulliu) wrote : | # |
hi. For kHeader[
I've wrote a function in https:/
For example, the function kHeaderColumnCo
Because I'll also need to add more childs for attribute UI later.
Andrea Cimitan (cimi) wrote : | # |
> hi. For kHeader[
> have arbitrary fields?
>
> I've wrote a function in
> https:/
>
> For example, the function kHeaderColumnCo
>
> Because I'll also need to add more childs for attribute UI later.
Ok, will do it tomorrow
- 942. By Andrea Cimitan
-
[ Ying-Chun Liu ]
* Add logout support. Reviewed by: Daniel d'Andrada (LP: #1302213)
[ Michał Sawicz ]
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Albert Astals ]
* Add VerticalJournal integration to Dash/scopes/QML (LP: #1326467)
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Mirco Müller ]
* Added the frontend-part of sound-hint support for notifications with
updated QML-tests.
* New rebuild forced
[ Albert Astals ]
* Departments support (LP: #1320847)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:942
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Text conflict in tests/plugins/
1 conflicts encountered.
- 943. By Andrea Cimitan
-
[ Michael Terry ]
* Fix path in launcher mock after moving our mock icons, to avoid a
lot of "icon not found" warnings during qmluitests.
* Fix the testMultiGreeter qmluitest. Incoming method variables are
apparently read-only in Qt5.3. (LP: #1332488)
[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Adapt scope mock to new api and quiet unused variable warnings.
* Fix dynamic overlay height. (LP: #1334879)
* Don't center items in CardVerticalJournal, kind of beats the
purpose... Also don't bind unnecessarily.
[ Ying-Chun Liu ]
* Fix LP:1330957 Fix some failed test cases. (LP: #1330957)
[ Albert Astals ]
* Don't seem to need this waitForRendering And makes test fail in 5.3
[ Alberto Aguirre ]
* Update Powerd plugin and Shell.qml to accommodate changes in the
display power state notification.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:943
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:943
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
All the whitespace changes should not be here.
Can you experiment using a GridLayout for mascot, title, subtitle and emblem? Or maybe just (sub)title and emblem, vcentering might be tricky otherwise.
Also see inline.
Albert Astals Cid (aacid) wrote : | # |
Text conflict in tests/plugins/
Text conflict in tests/plugins/
Text conflict in tests/plugins/
Text conflict in tests/plugins/
Conflict adding file tests/plugins/
Conflict adding file tests/plugins/
6 conflicts encountered.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:943
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Re-done in lp:~cimi/unity8/card_emblems_2
Unmerged revisions
- 943. By Andrea Cimitan
-
[ Michael Terry ]
* Fix path in launcher mock after moving our mock icons, to avoid a
lot of "icon not found" warnings during qmluitests.
* Fix the testMultiGreeter qmluitest. Incoming method variables are
apparently read-only in Qt5.3. (LP: #1332488)
[ CI bot ]
* Resync trunk
[ Michał Sawicz ]
* Adapt scope mock to new api and quiet unused variable warnings.
* Fix dynamic overlay height. (LP: #1334879)
* Don't center items in CardVerticalJournal, kind of beats the
purpose... Also don't bind unnecessarily.
[ Ying-Chun Liu ]
* Fix LP:1330957 Fix some failed test cases. (LP: #1330957)
[ Albert Astals ]
* Don't seem to need this waitForRendering And makes test fail in 5.3
[ Alberto Aguirre ]
* Update Powerd plugin and Shell.qml to accommodate changes in the
display power state notification. - 942. By Andrea Cimitan
-
[ Ying-Chun Liu ]
* Add logout support. Reviewed by: Daniel d'Andrada (LP: #1302213)
[ Michał Sawicz ]
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Albert Astals ]
* Add VerticalJournal integration to Dash/scopes/QML (LP: #1326467)
* Make so that fixedArtShapeSize actually fixes artShapeSize.
[ Mirco Müller ]
* Added the frontend-part of sound-hint support for notifications with
updated QML-tests.
* New rebuild forced
[ Albert Astals ]
* Departments support (LP: #1320847) - 941. By Andrea Cimitan
-
var rename
- 940. By Andrea Cimitan
-
Works
- 939. By Andrea Cimitan
-
WIP AND BROKEN
- 938. By Andrea Cimitan
-
Add parsing test for emblem
- 937. By Andrea Cimitan
-
Add tests for emblem
- 936. By Andrea Cimitan
-
Test pass again
- 935. By Andrea Cimitan
-
Some fixes for the emblem
- 934. By Andrea Cimitan
-
Better tests
Preview Diff
1 | === modified file 'plugins/Dash/CardCreator.js' | |||
2 | --- plugins/Dash/CardCreator.js 2014-06-27 08:47:33 +0000 | |||
3 | +++ plugins/Dash/CardCreator.js 2014-06-27 14:25:45 +0000 | |||
4 | @@ -181,15 +181,35 @@ | |||
5 | 181 | ] \n\ | 181 | ] \n\ |
6 | 182 | }\n'; | 182 | }\n'; |
7 | 183 | 183 | ||
17 | 184 | // %1 is used as first child of the column | 184 | // %1 is used as anchors |
18 | 185 | // %2 is used as second child of the column | 185 | // %2 is used as height of the container |
19 | 186 | var kHeaderColumnCode = 'Column { \n\ | 186 | // %3 is used as first child of the container |
20 | 187 | anchors.verticalCenter: parent.verticalCenter; \n\ | 187 | // %4 is used as second child of the container |
21 | 188 | spacing: units.dp(2); \n\ | 188 | var kHeader2ContainerCode = 'Item { \n\ |
22 | 189 | width: parent.width - x;\n\ | 189 | id: headerTitleContainer; \n\ |
23 | 190 | data: [ %1\n\ | 190 | anchors { %1 } \n\ |
24 | 191 | ,\n\ | 191 | width: parent.width - x; \n\ |
25 | 192 | %2 \n\ | 192 | implicitHeight: %2; \n\ |
26 | 193 | data: [ %3\n\ | ||
27 | 194 | ,\n\ | ||
28 | 195 | %4 \n\ | ||
29 | 196 | ] \n\ | ||
30 | 197 | }\n'; | ||
31 | 198 | |||
32 | 199 | // %1 is used as anchors | ||
33 | 200 | // %2 is used as first child of the container | ||
34 | 201 | // %3 is used as second child of the container | ||
35 | 202 | // %4 is used as third child of the container | ||
36 | 203 | var kHeader3ContainerCode = 'Item { \n\ | ||
37 | 204 | id: headerTitleContainer; \n\ | ||
38 | 205 | anchors { %1 } \n\ | ||
39 | 206 | width: parent.width - x; \n\ | ||
40 | 207 | implicitHeight: titleLabel.height + subtitleLabel.height; \n\ | ||
41 | 208 | data: [ %2\n\ | ||
42 | 209 | ,\n\ | ||
43 | 210 | %3 \n\ | ||
44 | 211 | ,\n\ | ||
45 | 212 | %4 \n\ | ||
46 | 193 | ] \n\ | 213 | ] \n\ |
47 | 194 | }\n'; | 214 | }\n'; |
48 | 195 | 215 | ||
49 | @@ -242,12 +262,25 @@ | |||
50 | 242 | horizontalAlignment: root.headerAlignment; \n\ | 262 | horizontalAlignment: root.headerAlignment; \n\ |
51 | 243 | }\n'; | 263 | }\n'; |
52 | 244 | 264 | ||
53 | 265 | var kEmblemImageCode = 'Image { \n\ | ||
54 | 266 | id: emblemImage; \n\ | ||
55 | 267 | objectName: "emblemImage"; \n\ | ||
56 | 268 | anchors { \n\ | ||
57 | 269 | bottom: titleLabel.baseline; \n\ | ||
58 | 270 | right: parent.right; \n\ } \n\ | ||
59 | 271 | source: cardData && cardData["emblem"]; \n\ | ||
60 | 272 | width: height; \n\ | ||
61 | 273 | height: titleLabel.font.pixelSize; \n\ | ||
62 | 274 | fillMode: Image.PreserveAspectFit; \n\ | ||
63 | 275 | }\n'; | ||
64 | 276 | |||
65 | 245 | // %1 is used as anchors of subtitleLabel | 277 | // %1 is used as anchors of subtitleLabel |
66 | 246 | // %2 is used as color of subtitleLabel | 278 | // %2 is used as color of subtitleLabel |
67 | 247 | var kSubtitleLabelCode = 'Label { \n\ | 279 | var kSubtitleLabelCode = 'Label { \n\ |
68 | 248 | id: subtitleLabel; \n\ | 280 | id: subtitleLabel; \n\ |
69 | 249 | objectName: "subtitleLabel"; \n\ | 281 | objectName: "subtitleLabel"; \n\ |
70 | 250 | anchors { %1 } \n\ | 282 | anchors { %1 } \n\ |
71 | 283 | anchors.topMargin: units.dp(2); \n\ | ||
72 | 251 | elide: Text.ElideRight; \n\ | 284 | elide: Text.ElideRight; \n\ |
73 | 252 | fontSize: "small"; \n\ | 285 | fontSize: "small"; \n\ |
74 | 253 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\ | 286 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\ |
75 | @@ -304,6 +337,7 @@ | |||
76 | 304 | var hasBackground = !isHorizontal && (template["card-background"] || components["background"] || artAndSummary); | 337 | var hasBackground = !isHorizontal && (template["card-background"] || components["background"] || artAndSummary); |
77 | 305 | var hasTitle = components["title"] || false; | 338 | var hasTitle = components["title"] || false; |
78 | 306 | var hasMascot = components["mascot"] || false; | 339 | var hasMascot = components["mascot"] || false; |
79 | 340 | var hasEmblem = components["emblem"] && !(hasMascot && template["card-size"] === "small") || false; | ||
80 | 307 | var headerAsOverlay = hasArt && template && template["overlay"] === true && (hasTitle || hasMascot); | 341 | var headerAsOverlay = hasArt && template && template["overlay"] === true && (hasTitle || hasMascot); |
81 | 308 | var hasSubtitle = components["subtitle"] || false; | 342 | var hasSubtitle = components["subtitle"] || false; |
82 | 309 | var hasHeaderRow = hasMascot && hasTitle; | 343 | var hasHeaderRow = hasMascot && hasTitle; |
83 | @@ -424,24 +458,44 @@ | |||
84 | 424 | 458 | ||
85 | 425 | var titleAnchors; | 459 | var titleAnchors; |
86 | 426 | var subtitleAnchors; | 460 | var subtitleAnchors; |
91 | 427 | if (hasMascot && hasSubtitle) { | 461 | var titleRightAnchor; |
92 | 428 | // Using row + column | 462 | var titleContainerAnchors; |
93 | 429 | titleAnchors = 'left: parent.left; right: parent.right'; | 463 | |
94 | 430 | subtitleAnchors = titleAnchors; | 464 | if (hasMascot) { |
95 | 465 | titleContainerAnchors = 'verticalCenter: parent.verticalCenter; '; | ||
96 | 466 | } else { | ||
97 | 467 | titleContainerAnchors = 'right: parent.right; '; | ||
98 | 468 | titleContainerAnchors += headerLeftAnchor; | ||
99 | 469 | titleContainerAnchors += headerVerticalAnchors; | ||
100 | 470 | } | ||
101 | 471 | if (hasEmblem) { | ||
102 | 472 | titleRightAnchor = 'right: emblemImage.left;\n'; | ||
103 | 473 | } else { | ||
104 | 474 | titleRightAnchor = 'right: parent.right;\n'; | ||
105 | 475 | } | ||
106 | 476 | |||
107 | 477 | if (hasEmblem || (hasMascot && hasSubtitle)) { | ||
108 | 478 | // Using titleContainer (and maybe row) | ||
109 | 479 | titleAnchors = titleRightAnchor; | ||
110 | 480 | titleAnchors += 'left: parent.left;\n\ | ||
111 | 481 | top: parent.top;'; | ||
112 | 482 | subtitleAnchors = 'right: parent.right;\n\ | ||
113 | 483 | left: parent.left;\n\ | ||
114 | 484 | top: titleLabel.bottom;\n'; | ||
115 | 431 | } else if (hasMascot) { | 485 | } else if (hasMascot) { |
118 | 432 | // Using row + label | 486 | // Using row + titleContainer |
119 | 433 | titleAnchors = 'verticalCenter: parent.verticalCenter;\n' | 487 | titleAnchors = 'verticalCenter: parent.verticalCenter;\n'; |
120 | 434 | } else { | 488 | } else { |
121 | 435 | if (headerAsOverlay) { | 489 | if (headerAsOverlay) { |
122 | 436 | // Using anchors to the overlay | 490 | // Using anchors to the overlay |
128 | 437 | titleAnchors = 'left: parent.left; \n\ | 491 | titleAnchors = titleRightAnchor; |
129 | 438 | leftMargin: units.gu(1); \n\ | 492 | titleAnchors += 'left: parent.left; \n\ |
130 | 439 | right: parent.right; \n\ | 493 | leftMargin: units.gu(1); \n\ |
131 | 440 | top: overlayLoader.top; \n\ | 494 | top: overlayLoader.top; \n\ |
132 | 441 | topMargin: units.gu(1);\n'; | 495 | topMargin: units.gu(1);\n'; |
133 | 442 | } else { | 496 | } else { |
134 | 443 | // Using anchors to the mascot/parent | 497 | // Using anchors to the mascot/parent |
136 | 444 | titleAnchors = "right: parent.right;"; | 498 | titleAnchors = titleRightAnchor; |
137 | 445 | titleAnchors += headerLeftAnchor; | 499 | titleAnchors += headerLeftAnchor; |
138 | 446 | titleAnchors += headerVerticalAnchors; | 500 | titleAnchors += headerVerticalAnchors; |
139 | 447 | if (!headerLeftAnchorHasMargin) { | 501 | if (!headerLeftAnchorHasMargin) { |
140 | @@ -450,22 +504,34 @@ | |||
141 | 450 | } | 504 | } |
142 | 451 | subtitleAnchors = 'left: titleLabel.left; \n\ | 505 | subtitleAnchors = 'left: titleLabel.left; \n\ |
143 | 452 | leftMargin: titleLabel.leftMargin; \n\ | 506 | leftMargin: titleLabel.leftMargin; \n\ |
147 | 453 | right: titleLabel.right; \n\ | 507 | top: titleLabel.bottom;\n'; |
148 | 454 | top: titleLabel.bottom; \n\ | 508 | if (hasEmblem) { |
149 | 455 | topMargin: units.dp(2);\n'; | 509 | // using container |
150 | 510 | subtitleAnchors += 'right: parent.right; \n'; | ||
151 | 511 | } else { | ||
152 | 512 | subtitleAnchors += 'right: titleLabel.right; \n'; | ||
153 | 513 | } | ||
154 | 456 | } | 514 | } |
155 | 457 | 515 | ||
156 | 458 | var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': ''); | 516 | var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': ''); |
158 | 459 | var titleCode = kTitleLabelCode.arg(titleAnchors).arg(color).arg(titleLabelVisibleExtra); | 517 | var titleCode; |
159 | 518 | titleCode = kTitleLabelCode.arg(titleAnchors).arg(color).arg(titleLabelVisibleExtra); | ||
160 | 460 | var subtitleCode = ""; | 519 | var subtitleCode = ""; |
161 | 461 | if (hasSubtitle) { | 520 | if (hasSubtitle) { |
162 | 462 | subtitleCode += kSubtitleLabelCode.arg(subtitleAnchors).arg(color); | 521 | subtitleCode += kSubtitleLabelCode.arg(subtitleAnchors).arg(color); |
163 | 463 | } | 522 | } |
164 | 464 | 523 | ||
168 | 465 | if (hasMascot && hasSubtitle) { | 524 | if (hasEmblem && hasSubtitle) { |
169 | 466 | // If using row + column wrap the code in the column | 525 | // using container 3 |
170 | 467 | titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode); | 526 | titleSubtitleCode = kHeader3ContainerCode.arg(titleContainerAnchors).arg(titleCode).arg(kEmblemImageCode).arg(kSubtitleLabelCode.arg(subtitleAnchors).arg(color)); |
171 | 527 | } else if (hasEmblem) { | ||
172 | 528 | // container with emblem | ||
173 | 529 | titleSubtitleCode = kHeader2ContainerCode.arg(titleContainerAnchors).arg('titleLabel.height').arg(titleCode).arg(kEmblemImageCode); | ||
174 | 530 | } else if (hasMascot && hasSubtitle) { | ||
175 | 531 | // container with subtitle | ||
176 | 532 | titleSubtitleCode = kHeader2ContainerCode.arg(titleContainerAnchors).arg('titleLabel.height + subtitleLabel.height').arg(titleCode).arg(subtitleCode); | ||
177 | 468 | } else { | 533 | } else { |
178 | 534 | // no container | ||
179 | 469 | titleSubtitleCode = titleCode + subtitleCode; | 535 | titleSubtitleCode = titleCode + subtitleCode; |
180 | 470 | } | 536 | } |
181 | 471 | } | 537 | } |
182 | @@ -485,6 +551,7 @@ | |||
183 | 485 | if (isHorizontal && hasArt) summaryTopAnchor = "artShapeHolder.bottom"; | 551 | if (isHorizontal && hasArt) summaryTopAnchor = "artShapeHolder.bottom"; |
184 | 486 | else if (headerAsOverlay && hasArt) summaryTopAnchor = "artShapeHolder.bottom"; | 552 | else if (headerAsOverlay && hasArt) summaryTopAnchor = "artShapeHolder.bottom"; |
185 | 487 | else if (hasHeaderRow) summaryTopAnchor = "row.bottom"; | 553 | else if (hasHeaderRow) summaryTopAnchor = "row.bottom"; |
186 | 554 | else if (hasEmblem || (hasMascot && hasSubtitle)) summaryTopAnchor = "headerTitleContainer.bottom"; | ||
187 | 488 | else if (hasMascot) summaryTopAnchor = "mascotImage.bottom"; | 555 | else if (hasMascot) summaryTopAnchor = "mascotImage.bottom"; |
188 | 489 | else if (hasSubtitle) summaryTopAnchor = "subtitleLabel.bottom"; | 556 | else if (hasSubtitle) summaryTopAnchor = "subtitleLabel.bottom"; |
189 | 490 | else if (hasTitle) summaryTopAnchor = "titleLabel.bottom"; | 557 | else if (hasTitle) summaryTopAnchor = "titleLabel.bottom"; |
190 | @@ -526,5 +593,21 @@ | |||
191 | 526 | import Ubuntu.Thumbnailer 0.1;\n'; | 593 | import Ubuntu.Thumbnailer 0.1;\n'; |
192 | 527 | var card = cardString(template, components); | 594 | var card = cardString(template, components); |
193 | 528 | var code = imports + 'Component {\n' + card + '}\n'; | 595 | var code = imports + 'Component {\n' + card + '}\n'; |
194 | 596 | |||
195 | 597 | // var splitCode = code.split("\n"); | ||
196 | 598 | // for (var i = 0; i < splitCode.length; ++i) { | ||
197 | 599 | // var lineNumber = i; | ||
198 | 600 | // if (i < 10) { | ||
199 | 601 | // lineNumber = lineNumber + " |"; | ||
200 | 602 | // } else if (i < 100) { | ||
201 | 603 | // lineNumber = lineNumber + " |"; | ||
202 | 604 | // } else if (i < 1000) { | ||
203 | 605 | // lineNumber = lineNumber + " |"; | ||
204 | 606 | // } else { | ||
205 | 607 | // lineNumber = lineNumber + "|"; | ||
206 | 608 | // } | ||
207 | 609 | // console.log(lineNumber, splitCode[i]); | ||
208 | 610 | // } | ||
209 | 611 | |||
210 | 529 | return Qt.createQmlObject(code, parent, "createCardComponent"); | 612 | return Qt.createQmlObject(code, parent, "createCardComponent"); |
211 | 530 | } | 613 | } |
212 | 531 | 614 | ||
213 | === modified file 'tests/plugins/Dash/cardcreator/1.res' | |||
214 | --- tests/plugins/Dash/cardcreator/1.res 2014-06-27 08:47:04 +0000 | |||
215 | +++ tests/plugins/Dash/cardcreator/1.res 2014-06-27 14:25:45 +0000 | |||
216 | @@ -65,7 +65,8 @@ | |||
217 | 65 | Label { | 65 | Label { |
218 | 66 | id: titleLabel; | 66 | id: titleLabel; |
219 | 67 | objectName: "titleLabel"; | 67 | objectName: "titleLabel"; |
221 | 68 | anchors { right: parent.right;left: parent.left; | 68 | anchors { right: parent.right; |
222 | 69 | left: parent.left; | ||
223 | 69 | top: artShapeHolder.bottom; | 70 | top: artShapeHolder.bottom; |
224 | 70 | topMargin: units.gu(1); | 71 | topMargin: units.gu(1); |
225 | 71 | leftMargin: units.gu(1); | 72 | leftMargin: units.gu(1); |
226 | 72 | 73 | ||
227 | === modified file 'tests/plugins/Dash/cardcreator/2.res' | |||
228 | --- tests/plugins/Dash/cardcreator/2.res 2014-06-18 10:26:01 +0000 | |||
229 | +++ tests/plugins/Dash/cardcreator/2.res 2014-06-27 14:25:45 +0000 | |||
230 | @@ -1,49 +1,49 @@ | |||
245 | 1 | AbstractButton { | 1 | AbstractButton { |
246 | 2 | id: root; | 2 | id: root; |
247 | 3 | property var template; | 3 | property var template; |
248 | 4 | property var components; | 4 | property var components; |
249 | 5 | property var cardData; | 5 | property var cardData; |
250 | 6 | property var artShapeBorderSource: undefined; | 6 | property var artShapeBorderSource: undefined; |
251 | 7 | property real fontScale: 1.0; | 7 | property real fontScale: 1.0; |
252 | 8 | property int headerAlignment: Text.AlignLeft; | 8 | property int headerAlignment: Text.AlignLeft; |
253 | 9 | property int fixedHeaderHeight: -1; | 9 | property int fixedHeaderHeight: -1; |
254 | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); |
255 | 11 | readonly property string title: cardData && cardData["title"] || ""; | 11 | readonly property string title: cardData && cardData["title"] || ""; |
256 | 12 | property bool asynchronous: true; | 12 | property bool asynchronous: true; |
257 | 13 | property bool showHeader: true; | 13 | property bool showHeader: true; |
258 | 14 | implicitWidth: childrenRect.width; | 14 | implicitWidth: childrenRect.width; |
259 | 15 | Loader { | 15 | Loader { |
291 | 16 | id: backgroundLoader; | 16 | id: backgroundLoader; |
292 | 17 | objectName: "backgroundLoader"; | 17 | objectName: "backgroundLoader"; |
293 | 18 | anchors.fill: parent; | 18 | anchors.fill: parent; |
294 | 19 | asynchronous: root.asynchronous; | 19 | asynchronous: root.asynchronous; |
295 | 20 | visible: status == Loader.Ready; | 20 | visible: status == Loader.Ready; |
296 | 21 | sourceComponent: UbuntuShape { | 21 | sourceComponent: UbuntuShape { |
297 | 22 | objectName: "background"; | 22 | objectName: "background"; |
298 | 23 | radius: "medium"; | 23 | radius: "medium"; |
299 | 24 | color: getColor(0) || "white"; | 24 | color: getColor(0) || "white"; |
300 | 25 | gradientColor: getColor(1) || color; | 25 | gradientColor: getColor(1) || color; |
301 | 26 | anchors.fill: parent; | 26 | anchors.fill: parent; |
302 | 27 | image: backgroundImage.source ? backgroundImage : null; | 27 | image: backgroundImage.source ? backgroundImage : null; |
303 | 28 | property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b; | 28 | property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b; |
304 | 29 | property Image backgroundImage: Image { | 29 | property Image backgroundImage: Image { |
305 | 30 | objectName: "backgroundImage"; | 30 | objectName: "backgroundImage"; |
306 | 31 | source: { | 31 | source: { |
307 | 32 | if (cardData && typeof cardData["background"] === "string") return cardData["background"]; | 32 | if (cardData && typeof cardData["background"] === "string") return cardData["background"]; |
308 | 33 | else if (template && typeof template["card-background"] === "string") return template["card-background"]; | 33 | else if (template && typeof template["card-background"] === "string") return template["card-background"]; |
309 | 34 | else return ""; | 34 | else return ""; |
310 | 35 | } | 35 | } |
311 | 36 | } | 36 | } |
312 | 37 | function getColor(index) { | 37 | function getColor(index) { |
313 | 38 | if (cardData && typeof cardData["background"] === "object" | 38 | if (cardData && typeof cardData["background"] === "object" |
314 | 39 | && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { | 39 | && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { |
315 | 40 | return cardData["background"]["elements"][index]; | 40 | return cardData["background"]["elements"][index]; |
316 | 41 | } else if (template && typeof template["card-background"] === "object" | 41 | } else if (template && typeof template["card-background"] === "object" |
317 | 42 | && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) { | 42 | && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) { |
318 | 43 | return template["card-background"]["elements"][index]; | 43 | return template["card-background"]["elements"][index]; |
319 | 44 | } else return undefined; | 44 | } else return undefined; |
320 | 45 | } | 45 | } |
321 | 46 | } | 46 | } |
322 | 47 | } | 47 | } |
323 | 48 | readonly property size artShapeSize: Qt.size(-1, -1); | 48 | readonly property size artShapeSize: Qt.size(-1, -1); |
324 | 49 | readonly property int headerHeight: row.height; | 49 | readonly property int headerHeight: row.height; |
325 | @@ -57,57 +57,62 @@ | |||
326 | 57 | topMargin: units.gu(1); | 57 | topMargin: units.gu(1); |
327 | 58 | left: parent.left; | 58 | left: parent.left; |
328 | 59 | } | 59 | } |
330 | 60 | anchors.right: parent.right; | 60 | anchors.right: parent.right; |
331 | 61 | anchors.margins: margins; | 61 | anchors.margins: margins; |
335 | 62 | data: [ Image { | 62 | data: [ Image { |
336 | 63 | id: mascotImage; | 63 | id: mascotImage; |
337 | 64 | objectName: "mascotImage"; | 64 | objectName: "mascotImage"; |
338 | 65 | anchors { verticalCenter: parent.verticalCenter; } | 65 | anchors { verticalCenter: parent.verticalCenter; } |
348 | 66 | readonly property int maxSize: Math.max(width, height) * 4; | 66 | readonly property int maxSize: Math.max(width, height) * 4; |
349 | 67 | source: cardData && cardData["mascot"]; | 67 | source: cardData && cardData["mascot"]; |
350 | 68 | width: units.gu(6); | 68 | width: units.gu(6); |
351 | 69 | height: units.gu(5.625); | 69 | height: units.gu(5.625); |
352 | 70 | sourceSize { width: maxSize; height: maxSize } | 70 | sourceSize { width: maxSize; height: maxSize } |
353 | 71 | fillMode: Image.PreserveAspectCrop; | 71 | fillMode: Image.PreserveAspectCrop; |
354 | 72 | horizontalAlignment: Image.AlignHCenter; | 72 | horizontalAlignment: Image.AlignHCenter; |
355 | 73 | verticalAlignment: Image.AlignVCenter; | 73 | verticalAlignment: Image.AlignVCenter; |
356 | 74 | visible: showHeader; | 74 | visible: showHeader; |
357 | 75 | } | 75 | } |
358 | 76 | , | 76 | , |
362 | 77 | Column { | 77 | Item { |
363 | 78 | anchors.verticalCenter: parent.verticalCenter; | 78 | id: headerTitleContainer; |
364 | 79 | spacing: units.dp(2); | 79 | anchors { verticalCenter: parent.verticalCenter; } |
365 | 80 | width: parent.width - x; | 80 | width: parent.width - x; |
381 | 81 | data: [ | 81 | implicitHeight: titleLabel.height + subtitleLabel.height; |
382 | 82 | Label { | 82 | data: [ Label { |
383 | 83 | id: titleLabel; | 83 | id: titleLabel; |
384 | 84 | objectName: "titleLabel"; | 84 | objectName: "titleLabel"; |
385 | 85 | anchors { left: parent.left; right: parent.right } | 85 | anchors { right: parent.right; |
386 | 86 | elide: Text.ElideRight; | 86 | left: parent.left; |
387 | 87 | fontSize: "small"; | 87 | top: parent.top; } |
388 | 88 | wrapMode: Text.Wrap; | 88 | elide: Text.ElideRight; |
389 | 89 | maximumLineCount: 2; | 89 | fontSize: "small"; |
390 | 90 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 90 | wrapMode: Text.Wrap; |
391 | 91 | color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"; | 91 | maximumLineCount: 2; |
392 | 92 | visible: showHeader ; | 92 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
393 | 93 | text: root.title; | 93 | color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"; |
394 | 94 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | 94 | visible: showHeader ; |
395 | 95 | horizontalAlignment: root.headerAlignment; | 95 | text: root.title; |
396 | 96 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | ||
397 | 97 | horizontalAlignment: root.headerAlignment; | ||
398 | 96 | } | 98 | } |
399 | 97 | , | 99 | , |
413 | 98 | Label { | 100 | Label { |
414 | 99 | id: subtitleLabel; | 101 | id: subtitleLabel; |
415 | 100 | objectName: "subtitleLabel"; | 102 | objectName: "subtitleLabel"; |
416 | 101 | anchors { left: parent.left; right: parent.right } | 103 | anchors { right: parent.right; |
417 | 102 | 104 | left: parent.left; | |
418 | 103 | elide: Text.ElideRight; | 105 | top: titleLabel.bottom; |
419 | 104 | fontSize: "small"; | 106 | } |
420 | 105 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 107 | anchors.topMargin: units.dp(2); |
421 | 106 | color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"; | 108 | elide: Text.ElideRight; |
422 | 107 | visible: titleLabel.visible && titleLabel.text; | 109 | fontSize: "small"; |
423 | 108 | text: cardData && cardData["subtitle"] || ""; | 110 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
424 | 109 | font.weight: Font.Light; | 111 | color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"; |
425 | 110 | horizontalAlignment: root.headerAlignment; | 112 | visible: titleLabel.visible && titleLabel.text; |
426 | 113 | text: cardData && cardData["subtitle"] || ""; | ||
427 | 114 | font.weight: Font.Light; | ||
428 | 115 | horizontalAlignment: root.headerAlignment; | ||
429 | 111 | } | 116 | } |
430 | 112 | ] | 117 | ] |
431 | 113 | } | 118 | } |
432 | 114 | 119 | ||
433 | === modified file 'tests/plugins/Dash/cardcreator/3.res' | |||
434 | --- tests/plugins/Dash/cardcreator/3.res 2014-06-27 08:47:04 +0000 | |||
435 | +++ tests/plugins/Dash/cardcreator/3.res 2014-06-27 14:25:45 +0000 | |||
436 | @@ -1,18 +1,18 @@ | |||
452 | 1 | AbstractButton { | 1 | AbstractButton { |
453 | 2 | id: root; | 2 | id: root; |
454 | 3 | property var template; | 3 | property var template; |
455 | 4 | property var components; | 4 | property var components; |
456 | 5 | property var cardData; | 5 | property var cardData; |
457 | 6 | property var artShapeBorderSource: undefined; | 6 | property var artShapeBorderSource: undefined; |
458 | 7 | property real fontScale: 1.0; | 7 | property real fontScale: 1.0; |
459 | 8 | property int headerAlignment: Text.AlignLeft; | 8 | property int headerAlignment: Text.AlignLeft; |
460 | 9 | property int fixedHeaderHeight: -1; | 9 | property int fixedHeaderHeight: -1; |
461 | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); |
462 | 11 | readonly property string title: cardData && cardData["title"] || ""; | 11 | readonly property string title: cardData && cardData["title"] || ""; |
463 | 12 | property bool asynchronous: true; | 12 | property bool asynchronous: true; |
464 | 13 | property bool showHeader: true; | 13 | property bool showHeader: true; |
465 | 14 | implicitWidth: childrenRect.width; | 14 | implicitWidth: childrenRect.width; |
466 | 15 | onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } | 15 | onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } |
467 | 16 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 16 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
468 | 17 | Item { | 17 | Item { |
469 | 18 | id: artShapeHolder; | 18 | id: artShapeHolder; |
470 | @@ -57,46 +57,48 @@ | |||
471 | 57 | readonly property real aspect: implicitWidth / implicitHeight; | 57 | readonly property real aspect: implicitWidth / implicitHeight; |
472 | 58 | width: root.width; | 58 | width: root.width; |
473 | 59 | height: width / artShape.aspect; | 59 | height: width / artShape.aspect; |
477 | 60 | } | 60 | } |
478 | 61 | } | 61 | } |
479 | 62 | } | 62 | } |
480 | 63 | } | 63 | } |
481 | 64 | readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin; | 64 | readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin; |
482 | 65 | Label { | 65 | Label { |
483 | 66 | id: titleLabel; | 66 | id: titleLabel; |
484 | 67 | objectName: "titleLabel"; | 67 | objectName: "titleLabel"; |
489 | 68 | anchors { right: parent.right;left: parent.left; | 68 | anchors { right: parent.right; |
490 | 69 | top: artShapeHolder.bottom; | 69 | left: parent.left; |
491 | 70 | topMargin: units.gu(1); | 70 | top: artShapeHolder.bottom; |
492 | 71 | leftMargin: units.gu(1); | 71 | topMargin: units.gu(1); |
493 | 72 | leftMargin: units.gu(1); | ||
494 | 72 | } | 73 | } |
505 | 73 | elide: Text.ElideRight; | 74 | elide: Text.ElideRight; |
506 | 74 | fontSize: "small"; | 75 | fontSize: "small"; |
507 | 75 | wrapMode: Text.Wrap; | 76 | wrapMode: Text.Wrap; |
508 | 76 | maximumLineCount: 2; | 77 | maximumLineCount: 2; |
509 | 77 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 78 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
510 | 78 | color: "grey"; | 79 | color: "grey"; |
511 | 79 | visible: showHeader ; | 80 | visible: showHeader ; |
512 | 80 | text: root.title; | 81 | text: root.title; |
513 | 81 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | 82 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; |
514 | 82 | horizontalAlignment: root.headerAlignment; | 83 | horizontalAlignment: root.headerAlignment; |
515 | 83 | } | 84 | } |
532 | 84 | Label { | 85 | Label { |
533 | 85 | id: subtitleLabel; | 86 | id: subtitleLabel; |
534 | 86 | objectName: "subtitleLabel"; | 87 | objectName: "subtitleLabel"; |
535 | 87 | anchors { left: titleLabel.left; | 88 | anchors { left: titleLabel.left; |
536 | 88 | leftMargin: titleLabel.leftMargin; | 89 | leftMargin: titleLabel.leftMargin; |
537 | 89 | right: titleLabel.right; | 90 | top: titleLabel.bottom; |
538 | 90 | top: titleLabel.bottom; | 91 | right: titleLabel.right; |
539 | 91 | topMargin: units.dp(2); } | 92 | } |
540 | 92 | elide: Text.ElideRight; | 93 | anchors.topMargin: units.dp(2); |
541 | 93 | fontSize: "small"; | 94 | elide: Text.ElideRight; |
542 | 94 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 95 | fontSize: "small"; |
543 | 95 | color: "grey"; | 96 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
544 | 96 | visible: titleLabel.visible && titleLabel.text; | 97 | color: "grey"; |
545 | 97 | text: cardData && cardData["subtitle"] || ""; | 98 | visible: titleLabel.visible && titleLabel.text; |
546 | 98 | font.weight: Font.Light; | 99 | text: cardData && cardData["subtitle"] || ""; |
547 | 99 | horizontalAlignment: root.headerAlignment; | 100 | font.weight: Font.Light; |
548 | 101 | horizontalAlignment: root.headerAlignment; | ||
549 | 100 | } | 102 | } |
550 | 101 | implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1); | 103 | implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1); |
551 | 102 | } | 104 | } |
552 | 103 | 105 | ||
553 | === modified file 'tests/plugins/Dash/cardcreator/4.res' | |||
554 | --- tests/plugins/Dash/cardcreator/4.res 2014-06-18 10:26:01 +0000 | |||
555 | +++ tests/plugins/Dash/cardcreator/4.res 2014-06-27 14:25:45 +0000 | |||
556 | @@ -1,17 +1,17 @@ | |||
571 | 1 | AbstractButton { | 1 | AbstractButton { |
572 | 2 | id: root; | 2 | id: root; |
573 | 3 | property var template; | 3 | property var template; |
574 | 4 | property var components; | 4 | property var components; |
575 | 5 | property var cardData; | 5 | property var cardData; |
576 | 6 | property var artShapeBorderSource: undefined; | 6 | property var artShapeBorderSource: undefined; |
577 | 7 | property real fontScale: 1.0; | 7 | property real fontScale: 1.0; |
578 | 8 | property int headerAlignment: Text.AlignLeft; | 8 | property int headerAlignment: Text.AlignLeft; |
579 | 9 | property int fixedHeaderHeight: -1; | 9 | property int fixedHeaderHeight: -1; |
580 | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); |
581 | 11 | readonly property string title: cardData && cardData["title"] || ""; | 11 | readonly property string title: cardData && cardData["title"] || ""; |
582 | 12 | property bool asynchronous: true; | 12 | property bool asynchronous: true; |
583 | 13 | property bool showHeader: true; | 13 | property bool showHeader: true; |
584 | 14 | implicitWidth: childrenRect.width; | 14 | implicitWidth: childrenRect.width; |
585 | 15 | readonly property size artShapeSize: Qt.size(-1, -1); | 15 | readonly property size artShapeSize: Qt.size(-1, -1); |
586 | 16 | readonly property int headerHeight: row.height; | 16 | readonly property int headerHeight: row.height; |
587 | 17 | Row { | 17 | Row { |
588 | @@ -24,70 +24,74 @@ | |||
589 | 24 | topMargin: units.gu(1); | 24 | topMargin: units.gu(1); |
590 | 25 | left: parent.left; | 25 | left: parent.left; |
591 | 26 | } | 26 | } |
593 | 27 | anchors.right: parent.right; | 27 | anchors.right: parent.right; |
594 | 28 | anchors.margins: margins; | 28 | anchors.margins: margins; |
604 | 29 | data: [ Loader { | 29 | data: [ Loader { |
605 | 30 | id: mascotShapeLoader; | 30 | id: mascotShapeLoader; |
606 | 31 | objectName: "mascotShapeLoader"; | 31 | objectName: "mascotShapeLoader"; |
607 | 32 | asynchronous: root.asynchronous; | 32 | asynchronous: root.asynchronous; |
608 | 33 | active: mascotImage.status === Image.Ready; | 33 | active: mascotImage.status === Image.Ready; |
609 | 34 | visible: showHeader && active && status == Loader.Ready; | 34 | visible: showHeader && active && status == Loader.Ready; |
610 | 35 | width: units.gu(6); | 35 | width: units.gu(6); |
611 | 36 | height: units.gu(5.625); | 36 | height: units.gu(5.625); |
612 | 37 | sourceComponent: UbuntuShape { image: mascotImage } | 37 | sourceComponent: UbuntuShape { image: mascotImage } |
613 | 38 | anchors { verticalCenter: parent.verticalCenter; } | 38 | anchors { verticalCenter: parent.verticalCenter; } |
614 | 39 | } | 39 | } |
615 | 40 | |||
616 | 41 | , | 40 | , |
620 | 42 | Image { | 41 | Image { |
621 | 43 | id: mascotImage; | 42 | id: mascotImage; |
622 | 44 | objectName: "mascotImage"; | 43 | objectName: "mascotImage"; |
623 | 45 | anchors { verticalCenter: parent.verticalCenter; } | 44 | anchors { verticalCenter: parent.verticalCenter; } |
633 | 46 | readonly property int maxSize: Math.max(width, height) * 4; | 45 | readonly property int maxSize: Math.max(width, height) * 4; |
634 | 47 | source: cardData && cardData["mascot"]; | 46 | source: cardData && cardData["mascot"]; |
635 | 48 | width: units.gu(6); | 47 | width: units.gu(6); |
636 | 49 | height: units.gu(5.625); | 48 | height: units.gu(5.625); |
637 | 50 | sourceSize { width: maxSize; height: maxSize } | 49 | sourceSize { width: maxSize; height: maxSize } |
638 | 51 | fillMode: Image.PreserveAspectCrop; | 50 | fillMode: Image.PreserveAspectCrop; |
639 | 52 | horizontalAlignment: Image.AlignHCenter; | 51 | horizontalAlignment: Image.AlignHCenter; |
640 | 53 | verticalAlignment: Image.AlignVCenter; | 52 | verticalAlignment: Image.AlignVCenter; |
641 | 54 | visible: false; | 53 | visible: false; |
642 | 55 | } | 54 | } |
643 | 56 | |||
644 | 57 | , | 55 | , |
648 | 58 | Column { | 56 | Item { |
649 | 59 | anchors.verticalCenter: parent.verticalCenter; | 57 | id: headerTitleContainer; |
650 | 60 | spacing: units.dp(2); | 58 | anchors { verticalCenter: parent.verticalCenter; } |
651 | 61 | width: parent.width - x; | 59 | width: parent.width - x; |
666 | 62 | data: [ Label { | 60 | implicitHeight: titleLabel.height + subtitleLabel.height; |
667 | 63 | id: titleLabel; | 61 | data: [ Label { |
668 | 64 | objectName: "titleLabel"; | 62 | id: titleLabel; |
669 | 65 | anchors { left: parent.left; right: parent.right } | 63 | objectName: "titleLabel"; |
670 | 66 | elide: Text.ElideRight; | 64 | anchors { right: parent.right; |
671 | 67 | fontSize: "small"; | 65 | left: parent.left; |
672 | 68 | wrapMode: Text.Wrap; | 66 | top: parent.top; } |
673 | 69 | maximumLineCount: 2; | 67 | elide: Text.ElideRight; |
674 | 70 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 68 | fontSize: "small"; |
675 | 71 | color: "grey"; | 69 | wrapMode: Text.Wrap; |
676 | 72 | visible: showHeader ; | 70 | maximumLineCount: 2; |
677 | 73 | text: root.title; | 71 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
678 | 74 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | 72 | color: "grey"; |
679 | 75 | horizontalAlignment: root.headerAlignment; | 73 | visible: showHeader ; |
680 | 74 | text: root.title; | ||
681 | 75 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | ||
682 | 76 | horizontalAlignment: root.headerAlignment; | ||
683 | 76 | } | 77 | } |
684 | 77 | , | 78 | , |
698 | 78 | Label { | 79 | Label { |
699 | 79 | id: subtitleLabel; | 80 | id: subtitleLabel; |
700 | 80 | objectName: "subtitleLabel"; | 81 | objectName: "subtitleLabel"; |
701 | 81 | anchors { left: parent.left; right: parent.right } | 82 | anchors { right: parent.right; |
702 | 82 | 83 | left: parent.left; | |
703 | 83 | elide: Text.ElideRight; | 84 | top: titleLabel.bottom; |
704 | 84 | fontSize: "small"; | 85 | } |
705 | 85 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 86 | anchors.topMargin: units.dp(2); |
706 | 86 | color: "grey"; | 87 | elide: Text.ElideRight; |
707 | 87 | visible: titleLabel.visible && titleLabel.text; | 88 | fontSize: "small"; |
708 | 88 | text: cardData && cardData["subtitle"] || ""; | 89 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
709 | 89 | font.weight: Font.Light; | 90 | color: "grey"; |
710 | 90 | horizontalAlignment: root.headerAlignment; | 91 | visible: titleLabel.visible && titleLabel.text; |
711 | 92 | text: cardData && cardData["subtitle"] || ""; | ||
712 | 93 | font.weight: Font.Light; | ||
713 | 94 | horizontalAlignment: root.headerAlignment; | ||
714 | 91 | } | 95 | } |
715 | 92 | ] | 96 | ] |
716 | 93 | } | 97 | } |
717 | 94 | 98 | ||
718 | === modified file 'tests/plugins/Dash/cardcreator/5.res' | |||
719 | --- tests/plugins/Dash/cardcreator/5.res 2014-06-24 11:08:23 +0000 | |||
720 | +++ tests/plugins/Dash/cardcreator/5.res 2014-06-27 14:25:45 +0000 | |||
721 | @@ -1,18 +1,18 @@ | |||
737 | 1 | AbstractButton { | 1 | AbstractButton { |
738 | 2 | id: root; | 2 | id: root; |
739 | 3 | property var template; | 3 | property var template; |
740 | 4 | property var components; | 4 | property var components; |
741 | 5 | property var cardData; | 5 | property var cardData; |
742 | 6 | property var artShapeBorderSource: undefined; | 6 | property var artShapeBorderSource: undefined; |
743 | 7 | property real fontScale: 1.0; | 7 | property real fontScale: 1.0; |
744 | 8 | property int headerAlignment: Text.AlignLeft; | 8 | property int headerAlignment: Text.AlignLeft; |
745 | 9 | property int fixedHeaderHeight: -1; | 9 | property int fixedHeaderHeight: -1; |
746 | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); |
747 | 11 | readonly property string title: cardData && cardData["title"] || ""; | 11 | readonly property string title: cardData && cardData["title"] || ""; |
748 | 12 | property bool asynchronous: true; | 12 | property bool asynchronous: true; |
749 | 13 | property bool showHeader: true; | 13 | property bool showHeader: true; |
750 | 14 | implicitWidth: childrenRect.width; | 14 | implicitWidth: childrenRect.width; |
751 | 15 | onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } | 15 | onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } |
752 | 16 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); | 16 | readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1); |
753 | 17 | Item { | 17 | Item { |
754 | 18 | id: artShapeHolder; | 18 | id: artShapeHolder; |
755 | @@ -57,9 +57,9 @@ | |||
756 | 57 | readonly property real aspect: implicitWidth / implicitHeight; | 57 | readonly property real aspect: implicitWidth / implicitHeight; |
757 | 58 | width: root.width; | 58 | width: root.width; |
758 | 59 | height: width / artShape.aspect; | 59 | height: width / artShape.aspect; |
762 | 60 | } | 60 | } |
763 | 61 | } | 61 | } |
764 | 62 | } | 62 | } |
765 | 63 | } | 63 | } |
766 | 64 | Loader { | 64 | Loader { |
767 | 65 | id: overlayLoader; | 65 | id: overlayLoader; |
768 | @@ -105,40 +105,40 @@ | |||
769 | 105 | Label { | 105 | Label { |
770 | 106 | id: titleLabel; | 106 | id: titleLabel; |
771 | 107 | objectName: "titleLabel"; | 107 | objectName: "titleLabel"; |
777 | 108 | anchors { left: parent.left; | 108 | anchors { right: parent.right; |
778 | 109 | leftMargin: units.gu(1); | 109 | left: parent.left; |
779 | 110 | right: parent.right; | 110 | leftMargin: units.gu(1); |
780 | 111 | top: overlayLoader.top; | 111 | top: overlayLoader.top; |
781 | 112 | topMargin: units.gu(1); | 112 | topMargin: units.gu(1); |
782 | 113 | } | 113 | } |
793 | 114 | elide: Text.ElideRight; | 114 | elide: Text.ElideRight; |
794 | 115 | fontSize: "small"; | 115 | fontSize: "small"; |
795 | 116 | wrapMode: Text.Wrap; | 116 | wrapMode: Text.Wrap; |
796 | 117 | maximumLineCount: 2; | 117 | maximumLineCount: 2; |
797 | 118 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 118 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
798 | 119 | color: "white"; | 119 | color: "white"; |
799 | 120 | visible: showHeader && overlayLoader.active; | 120 | visible: showHeader && overlayLoader.active; |
800 | 121 | text: root.title; | 121 | text: root.title; |
801 | 122 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | 122 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; |
802 | 123 | horizontalAlignment: root.headerAlignment; | 123 | horizontalAlignment: root.headerAlignment; |
803 | 124 | } | 124 | } |
821 | 125 | Label { | 125 | Label { |
822 | 126 | id: subtitleLabel; | 126 | id: subtitleLabel; |
823 | 127 | objectName: "subtitleLabel"; | 127 | objectName: "subtitleLabel"; |
824 | 128 | anchors { left: titleLabel.left; | 128 | anchors { left: titleLabel.left; |
825 | 129 | leftMargin: titleLabel.leftMargin; | 129 | leftMargin: titleLabel.leftMargin; |
826 | 130 | right: titleLabel.right; | 130 | top: titleLabel.bottom; |
827 | 131 | top: titleLabel.bottom; | 131 | right: titleLabel.right; |
828 | 132 | topMargin: units.dp(2); | 132 | } |
829 | 133 | } | 133 | anchors.topMargin: units.dp(2); |
830 | 134 | elide: Text.ElideRight; | 134 | elide: Text.ElideRight; |
831 | 135 | fontSize: "small"; | 135 | fontSize: "small"; |
832 | 136 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | 136 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); |
833 | 137 | color: "white"; | 137 | color: "white"; |
834 | 138 | visible: titleLabel.visible && titleLabel.text; | 138 | visible: titleLabel.visible && titleLabel.text; |
835 | 139 | text: cardData && cardData["subtitle"] || ""; | 139 | text: cardData && cardData["subtitle"] || ""; |
836 | 140 | font.weight: Font.Light; | 140 | font.weight: Font.Light; |
837 | 141 | horizontalAlignment: root.headerAlignment; | 141 | horizontalAlignment: root.headerAlignment; |
838 | 142 | } | 142 | } |
839 | 143 | implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1); | 143 | implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1); |
840 | 144 | } | 144 | } |
841 | 145 | 145 | ||
842 | === added file 'tests/plugins/Dash/cardcreator/6.res' | |||
843 | --- tests/plugins/Dash/cardcreator/6.res 1970-01-01 00:00:00 +0000 | |||
844 | +++ tests/plugins/Dash/cardcreator/6.res 2014-06-27 14:25:45 +0000 | |||
845 | @@ -0,0 +1,115 @@ | |||
846 | 1 | AbstractButton { | ||
847 | 2 | id: root; | ||
848 | 3 | property var template; | ||
849 | 4 | property var components; | ||
850 | 5 | property var cardData; | ||
851 | 6 | property var artShapeBorderSource: undefined; | ||
852 | 7 | property real fontScale: 1.0; | ||
853 | 8 | property int headerAlignment: Text.AlignLeft; | ||
854 | 9 | property int fixedHeaderHeight: -1; | ||
855 | 10 | property size fixedArtShapeSize: Qt.size(-1, -1); | ||
856 | 11 | readonly property string title: cardData && cardData["title"] || ""; | ||
857 | 12 | property bool asynchronous: true; | ||
858 | 13 | property bool showHeader: true; | ||
859 | 14 | implicitWidth: childrenRect.width; | ||
860 | 15 | readonly property size artShapeSize: Qt.size(-1, -1); | ||
861 | 16 | readonly property int headerHeight: row.height; | ||
862 | 17 | Row { | ||
863 | 18 | id: row; | ||
864 | 19 | objectName: "outerRow"; | ||
865 | 20 | property real margins: units.gu(1); | ||
866 | 21 | spacing: margins; | ||
867 | 22 | height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight; | ||
868 | 23 | anchors { top: parent.top; | ||
869 | 24 | topMargin: units.gu(1); | ||
870 | 25 | left: parent.left; | ||
871 | 26 | } | ||
872 | 27 | anchors.right: parent.right; | ||
873 | 28 | anchors.margins: margins; | ||
874 | 29 | data: [ Loader { | ||
875 | 30 | id: mascotShapeLoader; | ||
876 | 31 | objectName: "mascotShapeLoader"; | ||
877 | 32 | asynchronous: root.asynchronous; | ||
878 | 33 | active: mascotImage.status === Image.Ready; | ||
879 | 34 | visible: showHeader && active && status == Loader.Ready; | ||
880 | 35 | width: units.gu(6); | ||
881 | 36 | height: units.gu(5.625); | ||
882 | 37 | sourceComponent: UbuntuShape { image: mascotImage } | ||
883 | 38 | anchors { verticalCenter: parent.verticalCenter; } | ||
884 | 39 | } | ||
885 | 40 | , | ||
886 | 41 | Image { | ||
887 | 42 | id: mascotImage; | ||
888 | 43 | objectName: "mascotImage"; | ||
889 | 44 | anchors { verticalCenter: parent.verticalCenter; } | ||
890 | 45 | readonly property int maxSize: Math.max(width, height) * 4; | ||
891 | 46 | source: cardData && cardData["mascot"]; | ||
892 | 47 | width: units.gu(6); | ||
893 | 48 | height: units.gu(5.625); | ||
894 | 49 | sourceSize { width: maxSize; height: maxSize } | ||
895 | 50 | fillMode: Image.PreserveAspectCrop; | ||
896 | 51 | horizontalAlignment: Image.AlignHCenter; | ||
897 | 52 | verticalAlignment: Image.AlignVCenter; | ||
898 | 53 | visible: false; | ||
899 | 54 | } | ||
900 | 55 | , | ||
901 | 56 | Item { | ||
902 | 57 | id: headerTitleContainer; | ||
903 | 58 | anchors { verticalCenter: parent.verticalCenter; } | ||
904 | 59 | width: parent.width - x; | ||
905 | 60 | implicitHeight: titleLabel.height + subtitleLabel.height; | ||
906 | 61 | data: [ Label { | ||
907 | 62 | id: titleLabel; | ||
908 | 63 | objectName: "titleLabel"; | ||
909 | 64 | anchors { right: emblemImage.left; | ||
910 | 65 | left: parent.left; | ||
911 | 66 | top: parent.top; } | ||
912 | 67 | elide: Text.ElideRight; | ||
913 | 68 | fontSize: "small"; | ||
914 | 69 | wrapMode: Text.Wrap; | ||
915 | 70 | maximumLineCount: 2; | ||
916 | 71 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | ||
917 | 72 | color: "grey"; | ||
918 | 73 | visible: showHeader ; | ||
919 | 74 | text: root.title; | ||
920 | 75 | font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; | ||
921 | 76 | horizontalAlignment: root.headerAlignment; | ||
922 | 77 | } | ||
923 | 78 | , | ||
924 | 79 | Image { | ||
925 | 80 | id: emblemImage; | ||
926 | 81 | objectName: "emblemImage"; | ||
927 | 82 | anchors { | ||
928 | 83 | bottom: titleLabel.baseline; | ||
929 | 84 | right: parent.right; | ||
930 | 85 | } | ||
931 | 86 | source: cardData && cardData["emblem"]; | ||
932 | 87 | width: height; | ||
933 | 88 | height: titleLabel.font.pixelSize; | ||
934 | 89 | fillMode: Image.PreserveAspectFit; | ||
935 | 90 | } | ||
936 | 91 | |||
937 | 92 | , | ||
938 | 93 | Label { | ||
939 | 94 | id: subtitleLabel; | ||
940 | 95 | objectName: "subtitleLabel"; | ||
941 | 96 | anchors { right: parent.right; | ||
942 | 97 | left: parent.left; | ||
943 | 98 | top: titleLabel.bottom; | ||
944 | 99 | } | ||
945 | 100 | anchors.topMargin: units.dp(2); | ||
946 | 101 | elide: Text.ElideRight; | ||
947 | 102 | fontSize: "small"; | ||
948 | 103 | font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); | ||
949 | 104 | color: "grey"; | ||
950 | 105 | visible: titleLabel.visible && titleLabel.text; | ||
951 | 106 | text: cardData && cardData["subtitle"] || ""; | ||
952 | 107 | font.weight: Font.Light; | ||
953 | 108 | horizontalAlignment: root.headerAlignment; | ||
954 | 109 | } | ||
955 | 110 | ] | ||
956 | 111 | } | ||
957 | 112 | ] | ||
958 | 113 | } | ||
959 | 114 | implicitHeight: row.y + row.height + units.gu(1); | ||
960 | 115 | } | ||
961 | 0 | 116 | ||
962 | === added file 'tests/plugins/Dash/cardcreator/6.tst' | |||
963 | --- tests/plugins/Dash/cardcreator/6.tst 1970-01-01 00:00:00 +0000 | |||
964 | +++ tests/plugins/Dash/cardcreator/6.tst 2014-06-27 14:25:45 +0000 | |||
965 | @@ -0,0 +1,3 @@ | |||
966 | 1 | template: {"card-layout":"horizontal","card-size":"large","category-layout":"grid","collapsed-rows":2} | ||
967 | 2 | components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"mascot":{"field":"mascot"},"subtitle":{"field":"domain"},"title":{"field":"title"},"emblem":{"field":"emblem"}} | ||
968 | 3 | result: 6.res | ||
969 | 0 | 4 | ||
970 | === modified file 'tests/plugins/Dash/cardcreatortest.cpp' | |||
971 | --- tests/plugins/Dash/cardcreatortest.cpp 2014-05-06 13:09:08 +0000 | |||
972 | +++ tests/plugins/Dash/cardcreatortest.cpp 2014-06-27 14:25:45 +0000 | |||
973 | @@ -19,6 +19,7 @@ | |||
974 | 19 | #include <QQuickItem> | 19 | #include <QQuickItem> |
975 | 20 | #include <QQuickView> | 20 | #include <QQuickView> |
976 | 21 | #include <QtTestGui> | 21 | #include <QtTestGui> |
977 | 22 | #include <QDebug> | ||
978 | 22 | 23 | ||
979 | 23 | class CardCreatorTest : public QObject | 24 | class CardCreatorTest : public QObject |
980 | 24 | { | 25 | { |
981 | @@ -73,8 +74,13 @@ | |||
982 | 73 | QFile testResultFile(testDirPath + resultFileName); | 74 | QFile testResultFile(testDirPath + resultFileName); |
983 | 74 | QVERIFY(testResultFile.open(QIODevice::ReadOnly)); | 75 | QVERIFY(testResultFile.open(QIODevice::ReadOnly)); |
984 | 75 | QTextStream ts2(&testResultFile); | 76 | QTextStream ts2(&testResultFile); |
987 | 76 | const QString expectedResult = ts2.readAll(); | 77 | const QStringList expectedLines = ts2.readAll().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n"); |
988 | 77 | QCOMPARE(cardStringResult.toString().simplified(), expectedResult.simplified()); | 78 | const QStringList cardStringResultLines = cardStringResult.toString().trimmed().replace(QRegExp("\n\\s*\n"),"\n").split("\n"); |
989 | 79 | //QCOMPARE(cardStringResultLines.size(), expectedLines.size()); // This is not really needed... following for does that deeply | ||
990 | 80 | for (int i = 0; i < expectedLines.size(); ++i) { | ||
991 | 81 | //qDebug() << cardStringResultLines[i].simplified() << expectedLines[i].simplified(); | ||
992 | 82 | QCOMPARE(cardStringResultLines[i].simplified(), expectedLines[i].simplified()); | ||
993 | 83 | } | ||
994 | 78 | 84 | ||
995 | 79 | QVariant createCardComponentResult; | 85 | QVariant createCardComponentResult; |
996 | 80 | QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON)); | 86 | QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON)); |
997 | 81 | 87 | ||
998 | === modified file 'tests/qmltests/Dash/CardHelpers.js' | |||
999 | --- tests/qmltests/Dash/CardHelpers.js 2014-02-04 18:14:07 +0000 | |||
1000 | +++ tests/qmltests/Dash/CardHelpers.js 2014-06-27 14:25:45 +0000 | |||
1001 | @@ -59,6 +59,7 @@ | |||
1002 | 59 | "art": "art", \ | 59 | "art": "art", \ |
1003 | 60 | "subtitle": "subtitle", \ | 60 | "subtitle": "subtitle", \ |
1004 | 61 | "mascot": "mascot", \ | 61 | "mascot": "mascot", \ |
1005 | 62 | "emblem": "emblem", \ | ||
1006 | 62 | "summary": "summary" \ | 63 | "summary": "summary" \ |
1007 | 63 | }' | 64 | }' |
1008 | 64 | 65 | ||
1009 | 65 | 66 | ||
1010 | === added file 'tests/qmltests/Dash/artwork/emblem.png' | |||
1011 | 66 | Binary files tests/qmltests/Dash/artwork/emblem.png 1970-01-01 00:00:00 +0000 and tests/qmltests/Dash/artwork/emblem.png 2014-06-27 14:25:45 +0000 differ | 67 | Binary files tests/qmltests/Dash/artwork/emblem.png 1970-01-01 00:00:00 +0000 and tests/qmltests/Dash/artwork/emblem.png 2014-06-27 14:25:45 +0000 differ |
1012 | === modified file 'tests/qmltests/Dash/tst_Card.qml' | |||
1013 | --- tests/qmltests/Dash/tst_Card.qml 2014-06-27 08:47:04 +0000 | |||
1014 | +++ tests/qmltests/Dash/tst_Card.qml 2014-06-27 14:25:45 +0000 | |||
1015 | @@ -31,6 +31,7 @@ | |||
1016 | 31 | { | 31 | { |
1017 | 32 | "art": "../../../tests/qmltests/Dash/artwork/music-player-design.png", | 32 | "art": "../../../tests/qmltests/Dash/artwork/music-player-design.png", |
1018 | 33 | "mascot": "../../../tests/qmltests/Dash/artwork/avatar.png", | 33 | "mascot": "../../../tests/qmltests/Dash/artwork/avatar.png", |
1019 | 34 | "emblem": "../../../tests/qmltests/Dash/artwork/emblem.png", | ||
1020 | 34 | "title": "foo", | 35 | "title": "foo", |
1021 | 35 | "subtitle": "bar", | 36 | "subtitle": "bar", |
1022 | 36 | "summary": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | 37 | "summary": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
1023 | @@ -456,6 +457,23 @@ | |||
1024 | 456 | tryCompareFunction(function() { return Qt.colorEqual(subtitle.color, fontColor); }, true); | 457 | tryCompareFunction(function() { return Qt.colorEqual(subtitle.color, fontColor); }, true); |
1025 | 457 | } | 458 | } |
1026 | 458 | 459 | ||
1027 | 460 | function test_emblemImage_data() { | ||
1028 | 461 | return [ | ||
1029 | 462 | { tag: "Art and summary", emblem: true, index: 0 }, | ||
1030 | 463 | { tag: "Art and summary, small", emblem: false, index: 1 }, | ||
1031 | 464 | { tag: "No header", emblem: false, index: 7 }, | ||
1032 | 465 | { tag: "With background", emblem: true, index: 10 }, | ||
1033 | 466 | ]; | ||
1034 | 467 | } | ||
1035 | 468 | |||
1036 | 469 | function test_emblemImage(data) { | ||
1037 | 470 | selector.selectedIndex = data.index; | ||
1038 | 471 | waitForRendering(card); | ||
1039 | 472 | |||
1040 | 473 | var emblemImage = findChild(card, "emblemImage"); | ||
1041 | 474 | compare(emblemImage !== null, data.emblem); | ||
1042 | 475 | } | ||
1043 | 476 | |||
1044 | 459 | function test_mascotShape_data() { | 477 | function test_mascotShape_data() { |
1045 | 460 | return [ | 478 | return [ |
1046 | 461 | { tag: "Art and summary", shape: false, index: 0 }, | 479 | { tag: "Art and summary", shape: false, index: 0 }, |
FAILED: Continuous integration, rev:941 jenkins. qa.ubuntu. com/job/ unity8- ci/3183/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/1067 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- utopic/ 187 jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 277 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 277 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 277/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 277 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/1437 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/1867 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/1867/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 8670
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/3183/ rebuild
http://