Merge lp:~cimi/unity8/carousel-shadow into lp:unity8

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 890
Merged at revision: 902
Proposed branch: lp:~cimi/unity8/carousel-shadow
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/dynamic_specialized_cards
Diff against target: 145 lines (+25/-1)
8 files modified
plugins/Dash/CardCreator.js (+2/-0)
qml/Dash/CardCarousel.qml (+10/-1)
qml/Dash/graphics/carousel_dropshadow@27.sci (+5/-0)
tests/plugins/Dash/cardcreator/1.res (+2/-0)
tests/plugins/Dash/cardcreator/2.res (+1/-0)
tests/plugins/Dash/cardcreator/3.res (+2/-0)
tests/plugins/Dash/cardcreator/4.res (+1/-0)
tests/plugins/Dash/cardcreator/5.res (+2/-0)
To merge this branch: bzr merge lp:~cimi/unity8/carousel-shadow
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Andrea Cimitan (community) Needs Fixing
Review via email: mp+219233@code.launchpad.net

Commit message

Adds shadow for the carousel

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?
Yes

To post a comment you must log in.
Revision history for this message
Omer Akram (om26er) wrote :

26 + * Copyright (C) 2013 Canonical, Ltd.

2014 ?

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

> 26 + * Copyright (C) 2013 Canonical, Ltd.
>
> 2014 ?

That file shouldn't be there, it's victim of combined merges, I'll remove it tomorrow.

review: Needs Fixing
lp:~cimi/unity8/carousel-shadow updated
887. By Andrea Cimitan

Add newline in js

Revision history for this message
Albert Astals Cid (aacid) wrote :

Why are you setting the borderSouce for all creations now?

Have you run the tests?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

I mean we are setting "radius_idle.sci" when previously we didn't set anything, no?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~cimi/unity8/carousel-shadow updated
888. By Andrea Cimitan

Add shadow asset and remove bordersource default value - WIP REQUIRES OPTIMIZATION

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 :

make xvfbtestCardCreator

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Are we sure this border image with shadow is always going to be carousel only? Maybe it makes more sense to be inside the card than in the carousel?

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote :

> Are we sure this border image with shadow is always going to be carou
sel only?
> Maybe it makes more sense to be inside the card than in the carousel?

For now it is, so let's not add extra code in the creation!

lp:~cimi/unity8/carousel-shadow updated
889. By Andrea Cimitan

Added semicolon

890. By Andrea Cimitan

Fix tests

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, looks good

* Did CI run pass? If not, please explain why.
qmluitests are still on trusty

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/CardCreator.js'
--- plugins/Dash/CardCreator.js 2014-05-07 15:30:16 +0000
+++ plugins/Dash/CardCreator.js 2014-05-15 09:39:51 +0000
@@ -73,6 +73,7 @@
73 Component.onCompleted: updateWidthHeightBindings(); \n\73 Component.onCompleted: updateWidthHeightBindings(); \n\
74 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); \n\74 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); \n\
75 visible: image.status == Image.Ready; \n\75 visible: image.status == Image.Ready; \n\
76 borderSource: artShapeBorderSource; \n\
76 function updateWidthHeightBindings() { \n\77 function updateWidthHeightBindings() { \n\
77 if (aspectSmallerThanImageAspect) { \n\78 if (aspectSmallerThanImageAspect) { \n\
78 width = Qt.binding(function() { return !visible ? 0 : image.width }); \n\79 width = Qt.binding(function() { return !visible ? 0 : image.width }); \n\
@@ -280,6 +281,7 @@
280 property var template; \n\281 property var template; \n\
281 property var components; \n\282 property var components; \n\
282 property var cardData; \n\283 property var cardData; \n\
284 property var artShapeBorderSource; \n\
283 property real fontScale: 1.0; \n\285 property real fontScale: 1.0; \n\
284 property int headerAlignment: Text.AlignLeft; \n\286 property int headerAlignment: Text.AlignLeft; \n\
285 property int fixedHeaderHeight: -1; \n\287 property int fixedHeaderHeight: -1; \n\
286288
=== modified file 'qml/Dash/CardCarousel.qml'
--- qml/Dash/CardCarousel.qml 2014-05-07 13:55:44 +0000
+++ qml/Dash/CardCarousel.qml 2014-05-15 09:39:51 +0000
@@ -18,7 +18,6 @@
18import Ubuntu.Components 0.118import Ubuntu.Components 0.1
19import "../Components"19import "../Components"
2020
21
22DashRenderer {21DashRenderer {
23 id: cardCarousel22 id: cardCarousel
2423
@@ -66,6 +65,16 @@
66 item.components = Qt.binding(function() { return cardTool.components; });65 item.components = Qt.binding(function() { return cardTool.components; });
67 item.fontScale = Qt.binding(function() { return carousel.fontScale; });66 item.fontScale = Qt.binding(function() { return carousel.fontScale; });
68 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });67 item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
68 item.artShapeBorderSource = "none";
69 }
70
71 BorderImage {
72 anchors {
73 fill: parent
74 margins: -units.gu(1)
75 }
76 z: -1
77 source: "graphics/carousel_dropshadow.sci"
69 }78 }
70 }79 }
71 }80 }
7281
=== added file 'qml/Dash/graphics/carousel_dropshadow@27.png'
73Binary files qml/Dash/graphics/carousel_dropshadow@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/carousel_dropshadow@27.png 2014-05-15 09:39:51 +0000 differ82Binary files qml/Dash/graphics/carousel_dropshadow@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/carousel_dropshadow@27.png 2014-05-15 09:39:51 +0000 differ
=== added file 'qml/Dash/graphics/carousel_dropshadow@27.sci'
--- qml/Dash/graphics/carousel_dropshadow@27.sci 1970-01-01 00:00:00 +0000
+++ qml/Dash/graphics/carousel_dropshadow@27.sci 2014-05-15 09:39:51 +0000
@@ -0,0 +1,5 @@
1border.left: 108
2border.top: 108
3border.bottom: 108
4border.right: 108
5source: carousel_dropshadow@27.png
0\ No newline at end of file6\ No newline at end of file
17
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2014-05-07 13:31:55 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2014-05-15 09:39:51 +0000
@@ -3,6 +3,7 @@
3 property var template; 3 property var template;
4 property var components; 4 property var components;
5 property var cardData; 5 property var cardData;
6 property var artShapeBorderSource;
6 property real fontScale: 1.0; 7 property real fontScale: 1.0;
7 property int headerAlignment: Text.AlignLeft; 8 property int headerAlignment: Text.AlignLeft;
8 property int fixedHeaderHeight: -1; 9 property int fixedHeaderHeight: -1;
@@ -32,6 +33,7 @@
32 Component.onCompleted: updateWidthHeightBindings(); 33 Component.onCompleted: updateWidthHeightBindings();
33 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); 34 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
34 visible: image.status == Image.Ready; 35 visible: image.status == Image.Ready;
36 borderSource: artShapeBorderSource;
35 function updateWidthHeightBindings() { 37 function updateWidthHeightBindings() {
36 if (aspectSmallerThanImageAspect) { 38 if (aspectSmallerThanImageAspect) {
37 width = Qt.binding(function() { return !visible ? 0 : image.width }); 39 width = Qt.binding(function() { return !visible ? 0 : image.width });
3840
=== modified file 'tests/plugins/Dash/cardcreator/2.res'
--- tests/plugins/Dash/cardcreator/2.res 2014-05-07 13:31:55 +0000
+++ tests/plugins/Dash/cardcreator/2.res 2014-05-15 09:39:51 +0000
@@ -3,6 +3,7 @@
3 property var template; 3 property var template;
4 property var components; 4 property var components;
5 property var cardData; 5 property var cardData;
6 property var artShapeBorderSource;
6 property real fontScale: 1.0; 7 property real fontScale: 1.0;
7 property int headerAlignment: Text.AlignLeft; 8 property int headerAlignment: Text.AlignLeft;
8 property int fixedHeaderHeight: -1; 9 property int fixedHeaderHeight: -1;
910
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2014-05-07 15:30:16 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2014-05-15 09:39:51 +0000
@@ -3,6 +3,7 @@
3 property var template; 3 property var template;
4 property var components; 4 property var components;
5 property var cardData; 5 property var cardData;
6 property var artShapeBorderSource;
6 property real fontScale: 1.0; 7 property real fontScale: 1.0;
7 property int headerAlignment: Text.AlignLeft; 8 property int headerAlignment: Text.AlignLeft;
8 property int fixedHeaderHeight: -1; 9 property int fixedHeaderHeight: -1;
@@ -32,6 +33,7 @@
32 Component.onCompleted: updateWidthHeightBindings(); 33 Component.onCompleted: updateWidthHeightBindings();
33 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); 34 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
34 visible: image.status == Image.Ready; 35 visible: image.status == Image.Ready;
36 borderSource: artShapeBorderSource;
35 function updateWidthHeightBindings() { 37 function updateWidthHeightBindings() {
36 if (aspectSmallerThanImageAspect) { 38 if (aspectSmallerThanImageAspect) {
37 width = Qt.binding(function() { return !visible ? 0 : image.width }); 39 width = Qt.binding(function() { return !visible ? 0 : image.width });
3840
=== modified file 'tests/plugins/Dash/cardcreator/4.res'
--- tests/plugins/Dash/cardcreator/4.res 2014-05-07 13:31:55 +0000
+++ tests/plugins/Dash/cardcreator/4.res 2014-05-15 09:39:51 +0000
@@ -3,6 +3,7 @@
3 property var template; 3 property var template;
4 property var components; 4 property var components;
5 property var cardData; 5 property var cardData;
6 property var artShapeBorderSource;
6 property real fontScale: 1.0; 7 property real fontScale: 1.0;
7 property int headerAlignment: Text.AlignLeft; 8 property int headerAlignment: Text.AlignLeft;
8 property int fixedHeaderHeight: -1; 9 property int fixedHeaderHeight: -1;
910
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2014-05-07 15:30:16 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2014-05-15 09:39:51 +0000
@@ -3,6 +3,7 @@
3 property var template; 3 property var template;
4 property var components; 4 property var components;
5 property var cardData; 5 property var cardData;
6 property var artShapeBorderSource;
6 property real fontScale: 1.0; 7 property real fontScale: 1.0;
7 property int headerAlignment: Text.AlignLeft; 8 property int headerAlignment: Text.AlignLeft;
8 property int fixedHeaderHeight: -1; 9 property int fixedHeaderHeight: -1;
@@ -32,6 +33,7 @@
32 Component.onCompleted: updateWidthHeightBindings(); 33 Component.onCompleted: updateWidthHeightBindings();
33 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); 34 onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
34 visible: image.status == Image.Ready; 35 visible: image.status == Image.Ready;
36 borderSource: artShapeBorderSource;
35 function updateWidthHeightBindings() { 37 function updateWidthHeightBindings() {
36 if (aspectSmallerThanImageAspect) { 38 if (aspectSmallerThanImageAspect) {
37 width = Qt.binding(function() { return !visible ? 0 : image.width }); 39 width = Qt.binding(function() { return !visible ? 0 : image.width });

Subscribers

People subscribed via source and target branches