Merge lp:~cimi/unity8/fix-1411748 into lp:unity8

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1570
Merged at revision: 1591
Proposed branch: lp:~cimi/unity8/fix-1411748
Merge into: lp:unity8
Diff against target: 45 lines (+9/-2)
2 files modified
plugins/Dash/CardCreator.js (+2/-1)
tests/qmltests/Dash/tst_Card.qml (+7/-1)
To merge this branch: bzr merge lp:~cimi/unity8/fix-1411748
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+247278@code.launchpad.net

Commit message

Background needs to be specified to be visible in horizontal cards

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
n
 * Did you perform an exploratory manual test run of your code change and any related functionality?
y
 * Did you make sure that your branch does not contain spurious tags?
n
 * 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?
y

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

I'd prefer if you made the new "Art, summary, - horizontal" be exactly like the existing "Art, header, summary - horizontal" (minus the background) and renamed the exiting "Art, header, summary - horizontal" to "Art, header, summary, background - horizontal"

What do you think?

review: Needs Fixing
lp:~cimi/unity8/fix-1411748 updated
1570. By Andrea Cimitan

As review

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

 * 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.
Waiting before top approval

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/CardCreator.js'
2--- plugins/Dash/CardCreator.js 2015-01-12 13:11:36 +0000
3+++ plugins/Dash/CardCreator.js 2015-01-22 14:54:03 +0000
4@@ -320,7 +320,8 @@
5 var hasSummary = components["summary"] || false;
6 var artAndSummary = hasArt && hasSummary;
7 var isHorizontal = template["card-layout"] === "horizontal";
8- var hasBackground = (hasSummary || !isHorizontal) && (template["card-background"] || components["background"] || artAndSummary);
9+ var hasBackground = (!isHorizontal && (template["card-background"] || components["background"] || artAndSummary)) ||
10+ (hasSummary && (template["card-background"] || components["background"]));
11 var hasTitle = components["title"] || false;
12 var hasMascot = components["mascot"] || false;
13 var hasEmblem = components["emblem"] && !(hasMascot && template["card-size"] === "small") || false;
14
15=== modified file 'tests/qmltests/Dash/tst_Card.qml'
16--- tests/qmltests/Dash/tst_Card.qml 2015-01-12 13:11:36 +0000
17+++ tests/qmltests/Dash/tst_Card.qml 2015-01-22 14:54:03 +0000
18@@ -60,7 +60,7 @@
19 "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": { "aspect-ratio": 0.7 } }) }
20 },
21 {
22- "name": "Art, header, summary - horizontal",
23+ "name": "Art, header, summary, background - horizontal",
24 "layout": { "template": { "card-layout": "horizontal", "card-background": { "type": "gradient", "elements": ["grey", "white"] } },
25 "components": JSON.parse(Helpers.fullMapping) }
26 },
27@@ -101,6 +101,11 @@
28 "layout": { "template": { "overlay": true },
29 "components": { "art": "art", "title": "title" } }
30 },
31+ {
32+ "name": "Art, header, summary - horizontal",
33+ "layout": { "template": { "card-layout": "horizontal" },
34+ "components": JSON.parse(Helpers.fullMapping) }
35+ },
36 ]
37
38 CardTool {
39@@ -415,6 +420,7 @@
40 background: Qt.resolvedUrl("artwork/checkers.png"), index: 10 },
41 { tag: "Gradient background", visible: true, color: "#808080", gradientColor: "#ffffff", index: 11 },
42 { tag: "Image background", visible: true, image: Qt.resolvedUrl("artwork/checkers.png"), index: 12 },
43+ { tag: "Horizontal no background", visible: false, index: 14 },
44 ];
45 }
46

Subscribers

People subscribed via source and target branches