Merge lp:~nik90/cliffhanger/design-fixes-lucas-1 into lp:~flashback-dev/cliffhanger/trunk

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 46
Proposed branch: lp:~nik90/cliffhanger/design-fixes-lucas-1
Merge into: lp:~flashback-dev/cliffhanger/trunk
Diff against target: 418 lines (+133/-138)
8 files modified
components/Carousel.qml (+4/-4)
components/DetailCarousel.qml (+6/-6)
components/ListViewExpandable.qml (+80/-0)
components/RatingChooser.qml (+1/-2)
components/SearchCategory.qml (+0/-85)
components/Thumbnail.qml (+1/-1)
ui/PersonPage.qml (+22/-34)
ui/SearchAll.qml (+19/-6)
To merge this branch: bzr merge lp:~nik90/cliffhanger/design-fixes-lucas-1
Reviewer Review Type Date Requested Status
Flashback Dev Pending
Review via email: mp+211206@code.launchpad.net

Commit message

Design fixes proposed by Lucas Romero

Description of the change

Design fixes proposed by Lucas Romero

To post a comment you must log in.
47. By Nekhelesh Ramananthan

Merged trunk

48. By Nekhelesh Ramananthan

Replaced actors and production listview with expandables

49. By Nekhelesh Ramananthan

Added a placeholder text when biography is empty

50. By Nekhelesh Ramananthan

Added high res actors placeholder image by Andrea

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/Carousel.qml'
2--- components/Carousel.qml 2014-03-08 14:09:52 +0000
3+++ components/Carousel.qml 2014-03-17 19:29:33 +0000
4@@ -32,8 +32,8 @@
5 // Carousel Data Model
6 property alias dataModel: carouselList.model
7
8- // Carousel Thumbnail size
9- property int size: units.gu(12)
10+ // Carousel Thumbnail size (On the phone, show 2 + 2/3 cover art always by dynamically adjusting the size)
11+ property real size: parent.width < units.gu(50) ? (3 * (parent.width - 2*carouselList.spacing))/8 : units.gu(17)
12
13 // Property to hold the watched status
14 property bool showTraktUserStatus: false
15@@ -55,7 +55,7 @@
16 id: carouselList
17
18 width: parent.width
19- height: carousel.size + units.gu(10)
20+ height: 1.5*carousel.size + units.gu(5)
21 orientation: Qt.Horizontal
22 spacing: units.gu(2)
23
24@@ -87,7 +87,7 @@
25 Thumbnail {
26 id: carouselThumb
27 width: carousel.size
28- height: carousel.size + units.gu(5)
29+ height: 1.5*carousel.size
30 thumbSource: thumb_url
31 }
32
33
34=== modified file 'components/DetailCarousel.qml'
35--- components/DetailCarousel.qml 2014-03-08 14:09:52 +0000
36+++ components/DetailCarousel.qml 2014-03-17 19:29:33 +0000
37@@ -33,8 +33,8 @@
38 // Carousel Data Model
39 property alias dataModel: _carouselList.model
40
41- // Carousel Thumbnail size
42- property int size: units.gu(15)
43+ // Carousel Thumbnail size (On the phone, show 2 + 2/3 cover art always by dynamically adjusting the size)
44+ property int size: parent.width < units.gu(50) ? (3 * (parent.width - 2*_carouselList.spacing))/8 : units.gu(17)
45
46 // Property to show/hide date
47 property bool showDate: true
48@@ -56,14 +56,14 @@
49 id: _carouselList
50
51 width: parent.width
52- height: _detailCarousel.size + units.gu(12)
53+ height: 1.5*_detailCarousel.size + units.gu(5)
54 orientation: Qt.Horizontal
55 spacing: units.gu(2)
56
57 // Element consists of a Picture and a text label below it.
58 delegate: Item {
59 id: _carouselItem
60- width: _detailCarousel.size + units.gu(1)
61+ width: _detailCarousel.size
62 height: _thumbColumn.height
63
64 Column {
65@@ -74,8 +74,8 @@
66 Thumbnail {
67 id: _carouselThumb
68 radius: "medium"
69- width: _carouselItem.width
70- height: _detailCarousel.size + units.gu(7)
71+ width: _detailCarousel.size
72+ height: 1.5*_detailCarousel.size
73 thumbSource: thumb_url
74
75 Item {
76
77=== added file 'components/ListViewExpandable.qml'
78--- components/ListViewExpandable.qml 1970-01-01 00:00:00 +0000
79+++ components/ListViewExpandable.qml 2014-03-17 19:29:33 +0000
80@@ -0,0 +1,80 @@
81+/*
82+ * Flashback - Entertainment app for Ubuntu
83+ * Copyright (C) 2014 Nekhelesh Ramananthan <nik90@ubuntu.com>
84+ *
85+ * This program is free software: you can redistribute it and/or modify
86+ * it under the terms of the GNU General Public License version 3 as
87+ * published by the Free Software Foundation.
88+ *
89+ * This program is distributed in the hope that it will be useful,
90+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
91+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92+ * GNU General Public License for more details.
93+ *
94+ * You should have received a copy of the GNU General Public License
95+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
96+ *
97+ */
98+
99+import QtQuick 2.0
100+import Ubuntu.Components 0.1
101+import Ubuntu.Components.ListItems 0.1
102+
103+// Expandable List Element
104+Expandable {
105+ id: listviewExpandable
106+
107+ // Property to set the model of the search results listview
108+ property alias model: _resultsList.model
109+
110+ // Property to set the label of the search category header
111+ property alias header: _header.text
112+
113+ // Property to store the number of the search results
114+ property int count
115+
116+ // Property to set the listitem delegate
117+ property alias delegateItem: _resultsList.delegate
118+
119+ collapseOnClick: true
120+ enabled: count !== 0
121+ visible: count !== 0
122+ onClicked: expanded = true
123+ expandedHeight: _contentColumn.height + units.gu(1)
124+
125+ Column {
126+ id: _contentColumn
127+ anchors {
128+ left: parent.left
129+ right: parent.right
130+ }
131+
132+ Item {
133+ anchors {
134+ left: parent.left
135+ right: parent.right
136+ }
137+
138+ height: listviewExpandable.collapsedHeight
139+
140+ Label {
141+ id: _header
142+ anchors {
143+ left: parent.left
144+ right: parent.right
145+ verticalCenter: parent.verticalCenter
146+ }
147+ }
148+ }
149+
150+ ListView {
151+ id: _resultsList
152+ clip: true
153+ height: count > 5 ? 5 * units.gu(6) : count * units.gu(6)
154+ anchors {
155+ left: parent.left
156+ right: parent.right
157+ }
158+ }
159+ }
160+}
161
162=== modified file 'components/RatingChooser.qml'
163--- components/RatingChooser.qml 2014-03-08 14:09:52 +0000
164+++ components/RatingChooser.qml 2014-03-17 19:29:33 +0000
165@@ -51,11 +51,10 @@
166 }
167
168 color: "Black"
169- opacity: 0.85
170 visible: false
171 radius: units.gu(2)
172 width: parent.width/1.6
173- height: parent.height/1.2
174+ height: parent.height/1.2
175
176 TraktRatingModel { id: ratingListModel }
177
178
179=== removed file 'components/SearchCategory.qml'
180--- components/SearchCategory.qml 2014-03-14 09:06:47 +0000
181+++ components/SearchCategory.qml 1970-01-01 00:00:00 +0000
182@@ -1,85 +0,0 @@
183-/*
184- * Flashback - Entertainment app for Ubuntu
185- * Copyright (C) 2014 Nekhelesh Ramananthan <nik90@ubuntu.com>
186- *
187- * This program is free software: you can redistribute it and/or modify
188- * it under the terms of the GNU General Public License version 3 as
189- * published by the Free Software Foundation.
190- *
191- * This program is distributed in the hope that it will be useful,
192- * but WITHOUT ANY WARRANTY; without even the implied warranty of
193- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
194- * GNU General Public License for more details.
195- *
196- * You should have received a copy of the GNU General Public License
197- * along with this program. If not, see <http://www.gnu.org/licenses/>.
198- *
199- */
200-
201-import QtQuick 2.0
202-import Ubuntu.Components 0.1
203-import Ubuntu.Components.ListItems 0.1
204-
205-// Expandable Search Category Element
206-Expandable {
207- id: searchExpandableCategory
208-
209- // Property to set the model of the search results listview
210- property alias model: _searchResultsList.model
211-
212- // Property to set the label of the search category header
213- property alias header: _header.text
214-
215- // Property to store the number of the search results
216- property int count
217-
218- signal resultClicked(var model)
219-
220- collapseOnClick: true
221- enabled: count !== 0
222- visible: count !== 0
223- onClicked: expanded = true
224- expandedHeight: _contentColumn.height + units.gu(1)
225-
226- Column {
227- id: _contentColumn
228- anchors {
229- left: parent.left
230- right: parent.right
231- }
232-
233- Item {
234- anchors {
235- left: parent.left
236- right: parent.right
237- }
238-
239- height: searchExpandableCategory.collapsedHeight
240-
241- Label {
242- id: _header
243- anchors {
244- left: parent.left
245- right: parent.right
246- verticalCenter: parent.verticalCenter
247- }
248- }
249- }
250-
251- ListView {
252- id: _searchResultsList
253- clip: true
254- height: count > 5 ? 5 * units.gu(6) : count * units.gu(6)
255- anchors {
256- left: parent.left
257- right: parent.right
258- }
259-
260- delegate: Standard {
261- text: name
262- iconSource: thumb_url
263- onClicked: searchExpandableCategory.resultClicked(model)
264- }
265- }
266- }
267-}
268
269=== modified file 'components/Thumbnail.qml'
270--- components/Thumbnail.qml 2014-03-08 14:09:52 +0000
271+++ components/Thumbnail.qml 2014-03-17 19:29:33 +0000
272@@ -30,7 +30,7 @@
273
274 image: Image {
275 id: thumbPic
276- fillMode: Image.PreserveAspectFit
277+ fillMode: Image.PreserveAspectCrop
278 smooth: true
279 }
280
281
282=== modified file 'ui/PersonPage.qml'
283--- ui/PersonPage.qml 2014-03-08 14:09:52 +0000
284+++ ui/PersonPage.qml 2014-03-17 19:29:33 +0000
285@@ -261,52 +261,40 @@
286 margins: units.gu(2)
287 }
288
289- Header {
290- text: i18n.tr("Acting")
291- visible: personCast.count > 0
292- }
293-
294- ListView {
295- id: personCastView
296+ ListViewExpandable {
297+ id: actingExpandable
298 model: personCast.model
299-
300- anchors {
301- left: parent.left
302- right: parent.right
303- }
304-
305- height: units.gu(20)
306- clip: true
307- delegate: Subtitled {
308+ count: personCast.model.count
309+ header: "Acting (%1)".arg(count)
310+ delegateItem: Subtitled {
311 iconSource: thumb_url
312 text: title
313 subText: character
314 onClicked: mediaType == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : undefined
315 }
316- }
317-
318- Header {
319- text: i18n.tr("Production")
320- visible: personCrew.count > 0
321- }
322-
323- ListView {
324- id: personCrewView
325+ anchors {
326+ left: parent.left
327+ right: parent.right
328+ margins: -detailsColumn.anchors.margins
329+ }
330+ }
331+
332+ ListViewExpandable {
333+ id: productionExpandable
334 model: personCrew.model
335-
336- anchors {
337- left: parent.left
338- right: parent.right
339- }
340-
341- height: units.gu(20)
342- clip: true
343- delegate: Subtitled {
344+ count: personCrew.model.count
345+ header: "Production (%1)".arg(count)
346+ delegateItem: Subtitled {
347 iconSource: thumb_url
348 text: title
349 subText: department
350 onClicked: mediaType == "movie" ? pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": id}) : undefined
351 }
352+ anchors {
353+ left: parent.left
354+ right: parent.right
355+ margins: -detailsColumn.anchors.margins
356+ }
357 }
358 }
359 }
360
361=== modified file 'ui/SearchAll.qml'
362--- ui/SearchAll.qml 2014-03-14 09:06:47 +0000
363+++ ui/SearchAll.qml 2014-03-17 19:29:33 +0000
364@@ -18,6 +18,7 @@
365
366 import QtQuick 2.0
367 import Ubuntu.Components 0.1
368+import Ubuntu.Components.ListItems 0.1
369 import "../backend/backend.js" as Backend
370 import "../components"
371 import "../models"
372@@ -73,28 +74,40 @@
373 topMargin: units.gu(4)
374 }
375
376- SearchCategory {
377+ ListViewExpandable {
378 id: movieExpandable
379 model: movie_search_results.model
380 count: movie_search_results.model.count
381 header: "Movies (%1)".arg(count)
382- onResultClicked: pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": model.id})
383+ delegateItem: Standard {
384+ text: name
385+ iconSource: thumb_url
386+ onClicked: pageStack.push(Qt.resolvedUrl("MoviePage.qml"), {"movie_id": model.id})
387+ }
388 }
389
390- SearchCategory {
391+ ListViewExpandable {
392 id: showExpandable
393 model: show_search_results.model
394 count: show_search_results.model.count
395 header: "TV Shows (%1)".arg(count)
396- onResultClicked: pageStack.push(Qt.resolvedUrl("TvPage.qml"), {"tv_id": model.id})
397+ delegateItem: Standard {
398+ text: name
399+ iconSource: thumb_url
400+ onClicked: pageStack.push(Qt.resolvedUrl("TvPage.qml"), {"tv_id": model.id})
401+ }
402 }
403
404- SearchCategory {
405+ ListViewExpandable {
406 id: personExpandable
407 model: person_search_results.model
408 count: person_search_results.model.count
409 header: "Celebs (%1)".arg(count)
410- onResultClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": model.id, "type": "person"})
411+ delegateItem: Standard {
412+ text: name
413+ iconSource: thumb_url
414+ onClicked: pageStack.push(Qt.resolvedUrl("PersonPage.qml"), {"person_id": model.id, "type": "person"})
415+ }
416 }
417 }
418 }

Subscribers

People subscribed via source and target branches