Merge lp:~aacid/unity8/clickScopeForceArtShapeSize into lp:unity8
- clickScopeForceArtShapeSize
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~aacid/unity8/clickScopeForceArtShapeSize |
Merge into: | lp:unity8 |
Diff against target: |
371 lines (+37/-63) 18 files modified
plugins/Dash/CardCreator.js (+2/-8) qml/Dash/CardTool.qml (+1/-1) qml/Dash/GenericScopeView.qml (+4/-0) tests/plugins/Dash/cardcreator/1.res (+4/-10) tests/plugins/Dash/cardcreator/1.tst (+1/-1) tests/plugins/Dash/cardcreator/2.tst (+1/-1) tests/plugins/Dash/cardcreator/3.res (+4/-10) tests/plugins/Dash/cardcreator/3.tst (+1/-1) tests/plugins/Dash/cardcreator/4.tst (+1/-1) tests/plugins/Dash/cardcreator/5.res (+6/-12) tests/plugins/Dash/cardcreator/5.tst (+1/-1) tests/plugins/Dash/cardcreator/6.res (+2/-8) tests/plugins/Dash/cardcreator/6.tst (+1/-1) tests/plugins/Dash/cardcreator/7.res (+1/-1) tests/plugins/Dash/cardcreator/7.tst (+1/-1) tests/qmltests/Dash/CardHelpers.js (+1/-2) tests/qmltests/Dash/tst_Card.qml (+3/-3) tests/qmltests/Dash/tst_GenericScopeView.qml (+2/-1) |
To merge this branch: | bzr merge lp:~aacid/unity8/clickScopeForceArtShapeSize |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Unity Team | Pending | ||
Review via email: mp+228505@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-08-05.
Commit message
Hardcode art shape size for click scope local and predefined categories
While at it, drop the fillmode of cards
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
https:/
* 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
- 1088. By Albert Astals Cid
-
Fix creator expected code
- 1089. By Albert Astals Cid
-
We don't support fill-mode anymore
- 1090. By Albert Astals Cid
-
spacing
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1090
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1090
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1091. By Albert Astals Cid
-
More stable tests
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1091
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1092. By Albert Astals Cid
-
Merge
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1092
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://
- 1093. By Albert Astals Cid
-
Merge
- 1094. By Albert Astals Cid
-
Merge again
- 1095. By Albert Astals Cid
-
Pass the test
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1095
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://
- 1096. By Albert Astals Cid
-
Merge
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1096
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 1097. By Albert Astals Cid
-
The comment was upsetting people
Unmerged revisions
- 1097. By Albert Astals Cid
-
The comment was upsetting people
Preview Diff
1 | === modified file 'plugins/Dash/CardCreator.js' |
2 | --- plugins/Dash/CardCreator.js 2014-07-28 09:28:50 +0000 |
3 | +++ plugins/Dash/CardCreator.js 2014-08-05 18:01:59 +0000 |
4 | @@ -71,19 +71,14 @@ |
5 | visible: image.status == Image.Ready; \n\ |
6 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\ |
7 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\ |
8 | - readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; \n\ |
9 | Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } \n\ |
10 | - onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); \n\ |
11 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } \n\ |
12 | function updateWidthHeightBindings() { \n\ |
13 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { \n\ |
14 | width = root.fixedArtShapeSize.width; \n\ |
15 | height = root.fixedArtShapeSize.height; \n\ |
16 | - } else if (aspectSmallerThanImageAspect) { \n\ |
17 | + } else { \n\ |
18 | width = Qt.binding(function() { return !visible ? 0 : image.width }); \n\ |
19 | - height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); \n\ |
20 | - } else { \n\ |
21 | - width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); \n\ |
22 | height = Qt.binding(function() { return !visible ? 0 : image.height }); \n\ |
23 | } \n\ |
24 | } \n\ |
25 | @@ -92,8 +87,7 @@ |
26 | source: cardData && cardData["art"] || ""; \n\ |
27 | cache: true; \n\ |
28 | asynchronous: root.asynchronous; \n\ |
29 | - fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; \n\ |
30 | - readonly property real aspect: implicitWidth / implicitHeight; \n\ |
31 | + fillMode: Image.PreserveAspectCrop; \n\ |
32 | width: %2; \n\ |
33 | height: %3; \n\ |
34 | } \n\ |
35 | |
36 | === modified file 'qml/Dash/CardTool.qml' |
37 | --- qml/Dash/CardTool.qml 2014-07-28 11:59:50 +0000 |
38 | +++ qml/Dash/CardTool.qml 2014-08-05 18:01:59 +0000 |
39 | @@ -126,7 +126,7 @@ |
40 | type:real \brief Height of the card's header. |
41 | */ |
42 | readonly property int headerHeight: cardLoader.item ? cardLoader.item.headerHeight : 0 |
43 | - readonly property size artShapeSize: cardLoader.item ? cardLoader.item.artShapeSize : 0 |
44 | + property size artShapeSize: cardLoader.item ? cardLoader.item.artShapeSize : 0 |
45 | |
46 | /*! |
47 | \brief Desired alignment of header components. |
48 | |
49 | === modified file 'qml/Dash/GenericScopeView.qml' |
50 | --- qml/Dash/GenericScopeView.qml 2014-07-29 11:35:10 +0000 |
51 | +++ qml/Dash/GenericScopeView.qml 2014-08-05 18:01:59 +0000 |
52 | @@ -211,6 +211,10 @@ |
53 | baseItem.expand(shouldExpand, false /*animate*/); |
54 | } |
55 | updateDelegateCreationRange(); |
56 | + if (scope && scope.id === "clickscope" && (categoryId === "predefined" || categoryId === "local")) { |
57 | + // Yeah, hackish :/ |
58 | + cardTool.artShapeSize = Qt.size(units.gu(8), units.gu(7.5)); |
59 | + } |
60 | item.cardTool = cardTool; |
61 | } |
62 | |
63 | |
64 | === modified file 'tests/plugins/Dash/cardcreator/1.res' |
65 | --- tests/plugins/Dash/cardcreator/1.res 2014-07-24 10:03:58 +0000 |
66 | +++ tests/plugins/Dash/cardcreator/1.res 2014-08-05 18:01:59 +0000 |
67 | @@ -33,20 +33,15 @@ |
68 | visible: image.status == Image.Ready; |
69 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
70 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; |
71 | - readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; |
72 | - Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } |
73 | - onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); |
74 | + Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } |
75 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
76 | function updateWidthHeightBindings() { |
77 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
78 | width = root.fixedArtShapeSize.width; |
79 | height = root.fixedArtShapeSize.height; |
80 | - } else if (aspectSmallerThanImageAspect) { |
81 | - width = Qt.binding(function() { return !visible ? 0 : image.width }); |
82 | - height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); |
83 | } else { |
84 | - width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); |
85 | - height = Qt.binding(function() { return !visible ? 0 : image.height }); |
86 | + width = Qt.binding(function() { return !visible ? 0 : image.width }); |
87 | + height = Qt.binding(function() { return !visible ? 0 : image.height }); |
88 | } |
89 | } |
90 | image: Image { |
91 | @@ -54,8 +49,7 @@ |
92 | source: cardData && cardData["art"] || ""; |
93 | cache: true; |
94 | asynchronous: root.asynchronous; |
95 | - fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; |
96 | - readonly property real aspect: implicitWidth / implicitHeight; |
97 | + fillMode: Image.PreserveAspectCrop; |
98 | width: root.width; |
99 | height: width / artShape.aspect; |
100 | } |
101 | |
102 | === modified file 'tests/plugins/Dash/cardcreator/1.tst' |
103 | --- tests/plugins/Dash/cardcreator/1.tst 2014-05-06 10:06:54 +0000 |
104 | +++ tests/plugins/Dash/cardcreator/1.tst 2014-08-05 18:01:59 +0000 |
105 | @@ -1,3 +1,3 @@ |
106 | template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2} |
107 | -components: {"art":{"aspect-ratio":1.6,"field":"art","fill-mode":"fit"},"title":{"field":"title"}} |
108 | +components: {"art":{"aspect-ratio":1.6,"field":"art"},"title":{"field":"title"}} |
109 | result: 1.res |
110 | |
111 | === modified file 'tests/plugins/Dash/cardcreator/2.tst' |
112 | --- tests/plugins/Dash/cardcreator/2.tst 2014-05-06 10:10:10 +0000 |
113 | +++ tests/plugins/Dash/cardcreator/2.tst 2014-08-05 18:01:59 +0000 |
114 | @@ -1,3 +1,3 @@ |
115 | template: {"card-background":{"elements":["#E9E9E9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2} |
116 | -components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"}} |
117 | +components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"}} |
118 | result: 2.res |
119 | |
120 | === modified file 'tests/plugins/Dash/cardcreator/3.res' |
121 | --- tests/plugins/Dash/cardcreator/3.res 2014-07-24 10:03:58 +0000 |
122 | +++ tests/plugins/Dash/cardcreator/3.res 2014-08-05 18:01:59 +0000 |
123 | @@ -25,7 +25,7 @@ |
124 | objectName: "artShapeLoader"; |
125 | active: cardData && cardData["art"] || false; |
126 | asynchronous: root.asynchronous; |
127 | - visible: status == Loader.Ready; |
128 | + visible: status == Loader.Ready; |
129 | sourceComponent: UbuntuShape { |
130 | id: artShape; |
131 | objectName: "artShape"; |
132 | @@ -33,20 +33,15 @@ |
133 | visible: image.status == Image.Ready; |
134 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
135 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; |
136 | - readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; |
137 | Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } |
138 | - onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); |
139 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
140 | function updateWidthHeightBindings() { |
141 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
142 | width = root.fixedArtShapeSize.width; |
143 | height = root.fixedArtShapeSize.height; |
144 | - } else if (aspectSmallerThanImageAspect) { |
145 | - width = Qt.binding(function() { return !visible ? 0 : image.width }); |
146 | - height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); |
147 | } else { |
148 | - width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); |
149 | - height = Qt.binding(function() { return !visible ? 0 : image.height }); |
150 | + width = Qt.binding(function() { return !visible ? 0 : image.width }); |
151 | + height = Qt.binding(function() { return !visible ? 0 : image.height }); |
152 | } |
153 | } |
154 | image: Image { |
155 | @@ -54,8 +49,7 @@ |
156 | source: cardData && cardData["art"] || ""; |
157 | cache: true; |
158 | asynchronous: root.asynchronous; |
159 | - fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; |
160 | - readonly property real aspect: implicitWidth / implicitHeight; |
161 | + fillMode: Image.PreserveAspectCrop; |
162 | width: root.width; |
163 | height: width / artShape.aspect; |
164 | } |
165 | |
166 | === modified file 'tests/plugins/Dash/cardcreator/3.tst' |
167 | --- tests/plugins/Dash/cardcreator/3.tst 2014-05-06 10:10:10 +0000 |
168 | +++ tests/plugins/Dash/cardcreator/3.tst 2014-08-05 18:01:59 +0000 |
169 | @@ -1,3 +1,3 @@ |
170 | template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2} |
171 | -components: {"art":{"aspect-ratio":0.75,"field":"art","fill-mode":"crop"},"subtitle":{"field":"price"},"title":{"field":"title"}} |
172 | +components: {"art":{"aspect-ratio":0.75,"field":"art"},"subtitle":{"field":"price"},"title":{"field":"title"}} |
173 | result: 3.res |
174 | |
175 | === modified file 'tests/plugins/Dash/cardcreator/4.tst' |
176 | --- tests/plugins/Dash/cardcreator/4.tst 2014-05-06 10:06:54 +0000 |
177 | +++ tests/plugins/Dash/cardcreator/4.tst 2014-08-05 18:01:59 +0000 |
178 | @@ -1,3 +1,3 @@ |
179 | template: {"card-layout":"horizontal","card-size":"large","category-layout":"grid","collapsed-rows":2} |
180 | -components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"mascot":{"field":"mascot"},"subtitle":{"field":"domain"},"title":{"field":"title"}} |
181 | +components: {"art":{"aspect-ratio":1},"mascot":{"field":"mascot"},"subtitle":{"field":"domain"},"title":{"field":"title"}} |
182 | result: 4.res |
183 | |
184 | === modified file 'tests/plugins/Dash/cardcreator/5.res' |
185 | --- tests/plugins/Dash/cardcreator/5.res 2014-07-24 10:03:58 +0000 |
186 | +++ tests/plugins/Dash/cardcreator/5.res 2014-08-05 18:01:59 +0000 |
187 | @@ -25,7 +25,7 @@ |
188 | objectName: "artShapeLoader"; |
189 | active: cardData && cardData["art"] || false; |
190 | asynchronous: root.asynchronous; |
191 | - visible: status == Loader.Ready; |
192 | + visible: status == Loader.Ready; |
193 | sourceComponent: UbuntuShape { |
194 | id: artShape; |
195 | objectName: "artShape"; |
196 | @@ -33,20 +33,15 @@ |
197 | visible: image.status == Image.Ready; |
198 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
199 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; |
200 | - readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; |
201 | Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } |
202 | - onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); |
203 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
204 | function updateWidthHeightBindings() { |
205 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
206 | width = root.fixedArtShapeSize.width; |
207 | height = root.fixedArtShapeSize.height; |
208 | - } else if (aspectSmallerThanImageAspect) { |
209 | - width = Qt.binding(function() { return !visible ? 0 : image.width }); |
210 | - height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); |
211 | } else { |
212 | - width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); |
213 | - height = Qt.binding(function() { return !visible ? 0 : image.height }); |
214 | + width = Qt.binding(function() { return !visible ? 0 : image.width }); |
215 | + height = Qt.binding(function() { return !visible ? 0 : image.height }); |
216 | } |
217 | } |
218 | image: Image { |
219 | @@ -54,13 +49,12 @@ |
220 | source: cardData && cardData["art"] || ""; |
221 | cache: true; |
222 | asynchronous: root.asynchronous; |
223 | - fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; |
224 | - readonly property real aspect: implicitWidth / implicitHeight; |
225 | + fillMode: Image.PreserveAspectCrop; |
226 | width: root.width; |
227 | height: width / artShape.aspect; |
228 | } |
229 | } |
230 | - } |
231 | + } |
232 | } |
233 | Loader { |
234 | id: overlayLoader; |
235 | @@ -69,7 +63,7 @@ |
236 | right: artShapeHolder.right; |
237 | bottom: artShapeHolder.bottom; |
238 | } |
239 | - active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; |
240 | + active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; |
241 | asynchronous: root.asynchronous; |
242 | visible: showHeader && status == Loader.Ready; |
243 | sourceComponent: ShaderEffect { |
244 | |
245 | === modified file 'tests/plugins/Dash/cardcreator/5.tst' |
246 | --- tests/plugins/Dash/cardcreator/5.tst 2014-05-06 11:16:46 +0000 |
247 | +++ tests/plugins/Dash/cardcreator/5.tst 2014-08-05 18:01:59 +0000 |
248 | @@ -1,3 +1,3 @@ |
249 | template: {"card-layout":"vertical","card-size":"medium","category-layout":"carousel","collapsed-rows":2,"overlay":true} |
250 | -components: {"art":{"aspect-ratio":1,"field":"art","fill-mode":"crop"},"subtitle":{"field":"artist"},"title":{"field":"title"}} |
251 | +components: {"art":{"aspect-ratio":1,"field":"art"},"subtitle":{"field":"artist"},"title":{"field":"title"}} |
252 | result: 5.res |
253 | |
254 | === modified file 'tests/plugins/Dash/cardcreator/6.res' |
255 | --- tests/plugins/Dash/cardcreator/6.res 2014-07-10 18:03:16 +0000 |
256 | +++ tests/plugins/Dash/cardcreator/6.res 2014-08-05 18:01:59 +0000 |
257 | @@ -33,19 +33,14 @@ |
258 | visible: image.status == Image.Ready; |
259 | readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; |
260 | readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1; |
261 | - readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; |
262 | Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; } |
263 | - onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); |
264 | Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); } |
265 | function updateWidthHeightBindings() { |
266 | if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) { |
267 | width = root.fixedArtShapeSize.width; |
268 | height = root.fixedArtShapeSize.height; |
269 | - } else if (aspectSmallerThanImageAspect) { |
270 | + } else { |
271 | width = Qt.binding(function() { return !visible ? 0 : image.width }); |
272 | - height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); |
273 | - } else { |
274 | - width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); |
275 | height = Qt.binding(function() { return !visible ? 0 : image.height }); |
276 | } |
277 | } |
278 | @@ -54,8 +49,7 @@ |
279 | source: cardData && cardData["art"] || ""; |
280 | cache: true; |
281 | asynchronous: root.asynchronous; |
282 | - fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; |
283 | - readonly property real aspect: implicitWidth / implicitHeight; |
284 | + fillMode: Image.PreserveAspectCrop; |
285 | width: root.width; |
286 | height: width / artShape.aspect; |
287 | } |
288 | |
289 | === modified file 'tests/plugins/Dash/cardcreator/6.tst' |
290 | --- tests/plugins/Dash/cardcreator/6.tst 2014-07-08 09:50:44 +0000 |
291 | +++ tests/plugins/Dash/cardcreator/6.tst 2014-08-05 18:01:59 +0000 |
292 | @@ -1,3 +1,3 @@ |
293 | template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2} |
294 | -components: {"art":{"aspect-ratio":1.6,"field":"art","fill-mode":"fit"}} |
295 | +components: {"art":{"aspect-ratio":1.6,"field":"art"}} |
296 | result: 6.res |
297 | |
298 | === modified file 'tests/plugins/Dash/cardcreator/7.res' |
299 | --- tests/plugins/Dash/cardcreator/7.res 2014-07-24 10:03:58 +0000 |
300 | +++ tests/plugins/Dash/cardcreator/7.res 2014-08-05 18:01:59 +0000 |
301 | @@ -116,7 +116,7 @@ |
302 | objectName: "attributesRow"; |
303 | anchors { left: parent.left; right: parent.right } |
304 | color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : (root.scopeStyle ? root.scopeStyle.foreground : "grey"); |
305 | - model: cardData["attributes"] |
306 | + model: cardData && cardData["attributes"] || undefined; |
307 | } |
308 | |
309 | ] |
310 | |
311 | === modified file 'tests/plugins/Dash/cardcreator/7.tst' |
312 | --- tests/plugins/Dash/cardcreator/7.tst 2014-07-25 15:11:33 +0000 |
313 | +++ tests/plugins/Dash/cardcreator/7.tst 2014-08-05 18:01:59 +0000 |
314 | @@ -1,3 +1,3 @@ |
315 | template: {"card-background":{"elements":["#E9E9E9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2} |
316 | -components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"},"attributes":{"field":"attributes","max-count":2}} |
317 | +components: {"art":{"aspect-ratio":1},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"},"attributes":{"field":"attributes","max-count":2}} |
318 | result: 7.res |
319 | |
320 | === modified file 'tests/qmltests/Dash/CardHelpers.js' |
321 | --- tests/qmltests/Dash/CardHelpers.js 2014-07-25 15:11:33 +0000 |
322 | +++ tests/qmltests/Dash/CardHelpers.js 2014-08-05 18:01:59 +0000 |
323 | @@ -31,8 +31,7 @@ |
324 | "components": { \ |
325 | "title": null, \ |
326 | "art": { \ |
327 | - "aspect-ratio": 1.0, \ |
328 | - "fill-mode": "crop" \ |
329 | + "aspect-ratio": 1.0 \ |
330 | }, \ |
331 | "subtitle": null, \ |
332 | "mascot": null, \ |
333 | |
334 | === modified file 'tests/qmltests/Dash/tst_Card.qml' |
335 | --- tests/qmltests/Dash/tst_Card.qml 2014-07-31 16:49:38 +0000 |
336 | +++ tests/qmltests/Dash/tst_Card.qml 2014-08-05 18:01:59 +0000 |
337 | @@ -55,8 +55,8 @@ |
338 | "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": { "aspect-ratio": 2 } }) } |
339 | }, |
340 | { |
341 | - "name": "Art, title - fitted", |
342 | - "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": { "fill-mode": "fit" } }) } |
343 | + "name": "Art, title - tall", |
344 | + "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": { "aspect-ratio": 0.7 } }) } |
345 | }, |
346 | { |
347 | "name": "Art, header, summary - horizontal", |
348 | @@ -269,7 +269,7 @@ |
349 | { tag: "Small", width: units.gu(12), index: 1 }, |
350 | { tag: "Large", width: units.gu(38), index: 2 }, |
351 | { tag: "Wide", height: units.gu(19), size: "large", index: 3 }, |
352 | - { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 }, |
353 | + { tag: "Tall", height: units.gu(38) / 0.7, size: "large", width: units.gu(38), index: 4 }, |
354 | { tag: "VerticalWidth", width: function() { return headerRow.width + units.gu(1) * 2 }, index: 0 }, |
355 | { tag: "HorizontalHeight", height: function() { return headerRow.height + units.gu(1) * 2 }, index: 5 }, |
356 | { tag: "HorizontalWidth", width: function() { return headerRow.x - units.gu(1) }, index: 5 }, |
357 | |
358 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' |
359 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-07-24 20:40:57 +0000 |
360 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-08-05 18:01:59 +0000 |
361 | @@ -129,8 +129,9 @@ |
362 | var initialHeight = category.height; |
363 | mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2); |
364 | verify(category.expanded); |
365 | - tryCompareFunction(function() { return category.height > initialHeight; }, true); |
366 | + tryCompare(category, "height", category.item.expandedHeight + seeAll.height); |
367 | |
368 | + waitForRendering(seeAll); |
369 | mouseClick(seeAll, seeAll.width / 2, seeAll.height / 2); |
370 | verify(!category.expanded); |
371 | } |
FAILED: Continuous integration, rev:1088 jenkins. qa.ubuntu. com/job/ unity8- ci/3641/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- utopic- touch/2583 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- utopic/ 643 jenkins. qa.ubuntu. com/job/ unity8- utopic- amd64-ci/ 735 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 735 jenkins. qa.ubuntu. com/job/ unity8- utopic- armhf-ci/ 735/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- utopic- i386-ci/ 735 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- mako/2723 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3826 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/3826/ artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 10541
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/3641/ rebuild
http://