Merge lp:~vthompson/music-app/remix-queue-list into lp:music-app/remix
- remix-queue-list
- Merge into remix
Proposed by
Victor Thompson
Status: | Superseded |
---|---|
Proposed branch: | lp:~vthompson/music-app/remix-queue-list |
Merge into: | lp:music-app/remix |
Diff against target: |
341 lines (+65/-177) 3 files modified
MusicNowPlaying.qml (+29/-160) MusicTracks.qml (+8/-13) common/MusicRow.qml (+28/-4) |
To merge this branch: | bzr merge lp:~vthompson/music-app/remix-queue-list |
Related bugs: | |
Related blueprints: |
Music Remix for RTM
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Music App Developers | Pending | ||
Review via email:
|
This proposal has been superseded by a proposal from 2014-10-08.
Commit message
Initial Now Playing queue list refactor
Description of the change
Initial Now Playing queue list refactor based on initial Songs tab redesign.
To post a comment you must log in.
- 654. By Victor Thompson
-
Merge of prereq
- 655. By Victor Thompson
-
merge of prereq and resolve conflict
- 656. By Victor Thompson
-
Fix conflict
- 657. By Victor Thompson
-
merge of prereq
- 658. By Victor Thompson
-
Update per design
- 659. By Victor Thompson
-
Small update and refresh translations
- 660. By Victor Thompson
-
Merge of prereq
- 661. By Victor Thompson
-
Tweak capitalization of Now playing page title
- 662. By Victor Thompson
-
Merge of prereq
- 663. By Victor Thompson
-
Merge of prereq
- 664. By Victor Thompson
-
merge prereq
- 665. By Victor Thompson
-
Add a 2GU top margin, per design
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'MusicNowPlaying.qml' |
2 | --- MusicNowPlaying.qml 2014-10-06 00:26:56 +0000 |
3 | +++ MusicNowPlaying.qml 2014-10-08 03:33:02 +0000 |
4 | @@ -382,7 +382,12 @@ |
5 | } |
6 | delegate: queueDelegate |
7 | model: trackQueue.model |
8 | - highlightFollowsCurrentItem: false |
9 | + highlightFollowsCurrentItem: true |
10 | + highlight: Rectangle { |
11 | + color: "#2c2c34" |
12 | + focus: true |
13 | + } |
14 | + |
15 | state: "normal" |
16 | states: [ |
17 | State { |
18 | @@ -400,12 +405,8 @@ |
19 | } |
20 | } |
21 | ] |
22 | - footer: Item { |
23 | - height: mainView.height - (styleMusic.common.expandHeight + queuelist.currentHeight) + units.gu(8) |
24 | - } |
25 | |
26 | - property int normalHeight: units.gu(12) |
27 | - property int currentHeight: units.gu(40) |
28 | + property int normalHeight: units.gu(6) |
29 | property int transitionDuration: 250 // transition length of animations |
30 | |
31 | onCountChanged: { |
32 | @@ -419,7 +420,8 @@ |
33 | color: "transparent" |
34 | height: queuelist.normalHeight |
35 | objectName: "nowPlayingListItem" + index |
36 | - state: queuelist.currentIndex == index && !reordering ? "current" : "" |
37 | + showDivider: false |
38 | + state: "" |
39 | |
40 | leftSideAction: Remove { |
41 | onTriggered: { |
42 | @@ -475,7 +477,6 @@ |
43 | id: trackContainer; |
44 | anchors { |
45 | fill: parent |
46 | - margins: units.gu(1) |
47 | } |
48 | color: "transparent" |
49 | |
50 | @@ -495,159 +496,27 @@ |
51 | to: units.gu(0.5) |
52 | } |
53 | |
54 | - CoverRow { |
55 | - id: trackImage |
56 | - |
57 | - anchors { |
58 | - top: parent.top |
59 | - left: parent.left |
60 | - leftMargin: units.gu(1.5) |
61 | - } |
62 | - count: 1 |
63 | - size: (queueListItem.state === "current" |
64 | - ? (mainView.wideAspect |
65 | - ? queuelist.currentHeight |
66 | - : mainView.width - (trackImage.anchors.leftMargin * 2)) |
67 | - : queuelist.normalHeight) - units.gu(2) |
68 | + MusicRow { |
69 | + id: musicRow |
70 | covers: [{art: model.art, album: model.album, author: model.author}] |
71 | - |
72 | - spacing: units.gu(2) |
73 | - |
74 | - Item { // Background so can see text in current state |
75 | - id: albumBg |
76 | - visible: false |
77 | - anchors { |
78 | - bottom: parent.bottom |
79 | - left: parent.left |
80 | - right: parent.right |
81 | - } |
82 | - height: units.gu(9) |
83 | - clip: true |
84 | - UbuntuShape{ |
85 | - anchors { |
86 | - bottom: parent.bottom |
87 | - left: parent.left |
88 | - right: parent.right |
89 | - } |
90 | - height: trackImage.height |
91 | - radius: "medium" |
92 | - color: styleMusic.common.black |
93 | - opacity: 0.6 |
94 | - } |
95 | - } |
96 | - |
97 | - function calcAnchors() { |
98 | - if (trackImage.height > queuelist.normalHeight && mainView.wideAspect) { |
99 | - trackImage.anchors.left = undefined |
100 | - trackImage.anchors.horizontalCenter = trackImage.parent.horizontalCenter |
101 | - } else { |
102 | - trackImage.anchors.left = trackImage.parent.left |
103 | - trackImage.anchors.horizontalCenter = undefined |
104 | - } |
105 | - |
106 | - trackImage.width = trackImage.height; // force width to match height |
107 | - } |
108 | - |
109 | - Connections { |
110 | - target: mainView |
111 | - onWideAspectChanged: trackImage.calcAnchors() |
112 | - } |
113 | - |
114 | - onHeightChanged: { |
115 | - calcAnchors() |
116 | - } |
117 | - Behavior on height { |
118 | - NumberAnimation { |
119 | - target: trackImage; |
120 | - property: "height"; |
121 | - duration: queuelist.transitionDuration; |
122 | - } |
123 | - } |
124 | - } |
125 | - Label { |
126 | - id: nowPlayingArtist |
127 | - objectName: "artistLabel" |
128 | - color: styleMusic.nowPlaying.labelSecondaryColor |
129 | - elide: Text.ElideRight |
130 | - height: units.gu(1) |
131 | - text: model.author |
132 | - fontSize: 'small' |
133 | - width: parent.width - trackImage.width - units.gu(3.5) |
134 | - x: trackImage.x + trackImage.width + units.gu(1) |
135 | - y: trackImage.y + units.gu(1) |
136 | - } |
137 | - Label { |
138 | - id: nowPlayingTitle |
139 | - objectName: "titleLabel" |
140 | - color: styleMusic.common.white |
141 | - elide: Text.ElideRight |
142 | - height: units.gu(1) |
143 | - text: model.title |
144 | - fontSize: 'medium' |
145 | - width: parent.width - trackImage.width - units.gu(3.5) |
146 | - x: trackImage.x + trackImage.width + units.gu(1) |
147 | - y: nowPlayingArtist.y + nowPlayingArtist.height + units.gu(1.25) |
148 | - } |
149 | - Label { |
150 | - id: nowPlayingAlbum |
151 | - objectName: "albumLabel" |
152 | - color: styleMusic.nowPlaying.labelSecondaryColor |
153 | - elide: Text.ElideRight |
154 | - height: units.gu(1) |
155 | - text: model.album |
156 | - fontSize: 'x-small' |
157 | - width: parent.width - trackImage.width - units.gu(3.5) |
158 | - x: trackImage.x + trackImage.width + units.gu(1) |
159 | - y: nowPlayingTitle.y + nowPlayingTitle.height + units.gu(1.25) |
160 | - } |
161 | - } |
162 | - |
163 | - states: State { |
164 | - name: "current" |
165 | - PropertyChanges { |
166 | - target: queueListItem |
167 | - height: trackImage.size + (trackContainer.anchors.margins * 2) |
168 | - } |
169 | - PropertyChanges { |
170 | - target: nowPlayingArtist |
171 | - width: trackImage.width - units.gu(4) |
172 | - x: trackImage.x + units.gu(2) |
173 | - y: trackImage.y + trackImage.height - albumBg.height + units.gu(1) |
174 | - color: styleMusic.common.white |
175 | - } |
176 | - PropertyChanges { |
177 | - target: nowPlayingTitle |
178 | - width: trackImage.width - units.gu(4) |
179 | - x: trackImage.x + units.gu(2) |
180 | - y: nowPlayingArtist.y + nowPlayingArtist.height + units.gu(1.25) |
181 | - color: styleMusic.common.white |
182 | - font.weight: Font.DemiBold |
183 | - } |
184 | - PropertyChanges { |
185 | - target: nowPlayingAlbum |
186 | - width: trackImage.width - units.gu(4) |
187 | - x: trackImage.x + units.gu(2) |
188 | - y: nowPlayingTitle.y + nowPlayingTitle.height + units.gu(1.25) |
189 | - color: styleMusic.common.white |
190 | - } |
191 | - PropertyChanges { |
192 | - target: albumBg |
193 | - visible: true |
194 | - } |
195 | - } |
196 | - transitions: Transition { |
197 | - from: ",current" |
198 | - to: "current," |
199 | - NumberAnimation { |
200 | - duration: queuelist.transitionDuration |
201 | - properties: "height,opacity,width,x,y" |
202 | - } |
203 | - |
204 | - onRunningChanged: { |
205 | - if (running === false && ensureVisibleIndex != -1) |
206 | - { |
207 | - queuelist.positionViewAtIndex(ensureVisibleIndex, ListView.Beginning); |
208 | - ensureVisibleIndex = -1; |
209 | + isSquare: true |
210 | + coverSize: units.gu(6) |
211 | + column: Column { |
212 | + Label { |
213 | + id: trackTitle |
214 | + color: styleMusic.common.music |
215 | + fontSize: "small" |
216 | + objectName: "titleLabel" |
217 | + text: model.title |
218 | + } |
219 | + |
220 | + Label { |
221 | + id: trackArtist |
222 | + color: styleMusic.common.subtitle |
223 | + fontSize: "x-small" |
224 | + objectName: "artistLabel" |
225 | + text: model.author |
226 | + } |
227 | } |
228 | } |
229 | } |
230 | |
231 | === modified file 'MusicTracks.qml' |
232 | --- MusicTracks.qml 2014-09-30 15:18:25 +0000 |
233 | +++ MusicTracks.qml 2014-10-08 03:33:02 +0000 |
234 | @@ -60,7 +60,8 @@ |
235 | color: "transparent" |
236 | objectName: "tracksPageListItem" + index |
237 | width: parent.width |
238 | - height: styleMusic.common.itemHeight |
239 | + height: units.gu(6) |
240 | + showDivider: false |
241 | |
242 | rightSideActions: [ |
243 | AddToQueue { |
244 | @@ -79,28 +80,22 @@ |
245 | MusicRow { |
246 | id: musicRow |
247 | covers: [{art: model.art}] |
248 | + isSquare: true |
249 | + coverSize: units.gu(6) |
250 | column: Column { |
251 | - spacing: units.gu(1) |
252 | - Label { |
253 | - id: trackArtist |
254 | - color: styleMusic.common.subtitle |
255 | - fontSize: "x-small" |
256 | - text: model.author |
257 | - } |
258 | - |
259 | Label { |
260 | id: trackTitle |
261 | color: styleMusic.common.music |
262 | - fontSize: "medium" |
263 | + fontSize: "small" |
264 | objectName: "tracktitle" |
265 | text: model.title |
266 | } |
267 | |
268 | Label { |
269 | - id: trackAlbum |
270 | + id: trackArtist |
271 | color: styleMusic.common.subtitle |
272 | - fontSize: "xx-small" |
273 | - text: model.album |
274 | + fontSize: "x-small" |
275 | + text: model.author |
276 | } |
277 | } |
278 | } |
279 | |
280 | === modified file 'common/MusicRow.qml' |
281 | --- common/MusicRow.qml 2014-10-05 06:08:44 +0000 |
282 | +++ common/MusicRow.qml 2014-10-08 03:33:02 +0000 |
283 | @@ -31,21 +31,44 @@ |
284 | |
285 | property alias covers: coverRow.covers |
286 | property bool showCovers: true |
287 | + property bool isSquare: false |
288 | property alias pressed: coverRow.pressed |
289 | property alias column: columnComponent.sourceComponent |
290 | + property real coverSize: styleMusic.common.albumSize |
291 | |
292 | spacing: units.gu(1) |
293 | |
294 | CoverRow { |
295 | id: coverRow |
296 | - visible: showCovers |
297 | + visible: showCovers && !isSquare |
298 | anchors { |
299 | top: parent.top |
300 | topMargin: units.gu(1) |
301 | } |
302 | count: covers.length |
303 | covers: [] |
304 | - size: styleMusic.common.albumSize |
305 | + size: coverSize |
306 | + } |
307 | + |
308 | + Image { |
309 | + id: coverSquare |
310 | + visible: showCovers && isSquare |
311 | + width: coverSize |
312 | + height: coverSize |
313 | + anchors { |
314 | + top: parent.top |
315 | + topMargin: units.gu(0.25) |
316 | + } |
317 | + source: coverRow.count !== 0 && coverRow.covers[0] !== "" && coverRow.covers[0] !== undefined |
318 | + ? (coverRow.covers[0].art !== undefined |
319 | + ? coverRow.covers[0].art |
320 | + : "image://albumart/artist=" + coverRow.covers[0].author + "&album=" + coverRow.covers[0].album) |
321 | + : Qt.resolvedUrl("../images/music-app-cover@30.png") |
322 | + onStatusChanged: { |
323 | + if (status === Image.Error) { |
324 | + source = Qt.resolvedUrl("../images/music-app-cover@30.png") |
325 | + } |
326 | + } |
327 | } |
328 | |
329 | Loader { |
330 | @@ -54,8 +77,9 @@ |
331 | top: parent.top |
332 | topMargin: units.gu(1) |
333 | } |
334 | - width: showCovers ? parent.width - coverRow.width - parent.spacing |
335 | - : parent.width - parent.spacing |
336 | + width: !showCovers ? parent.width - parent.spacing |
337 | + : (isSquare ? parent.width - coverSquare.width - parent.spacing |
338 | + : parent.width - coverRow.width - parent.spacing) |
339 | |
340 | onSourceComponentChanged: { |
341 | for (var i=0; i < item.children.length; i++) { |