Merge lp:~vthompson/music-app/sketching-the-future-001 into lp:music-app/remix
- sketching-the-future-001
- Merge into remix
Status: | Merged |
---|---|
Approved by: | Andrew Hayzen |
Approved revision: | 765 |
Merged at revision: | 789 |
Proposed branch: | lp:~vthompson/music-app/sketching-the-future-001 |
Merge into: | lp:music-app/remix |
Diff against target: |
687 lines (+339/-246) 4 files modified
MusicNowPlaying.qml (+329/-237) Style.qml (+4/-4) common/ListItemWithActions.qml (+2/-2) music-app.qml (+4/-3) |
To merge this branch: | bzr merge lp:~vthompson/music-app/sketching-the-future-001 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hayzen | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email:
|
Commit message
* Show full cover art in Now Playing
* Allow swipe left or right to navigate queue in Now Playing
Description of the change
Inputs from the community [1] along with the fact that the cover art provided by the thumbnailer service is mostly adequate enough to display full screen cover art, has given the team a desire to change how the Now Playing view displays cover art. This change displays full screen cover art.
[1] https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Victor Thompson (vthompson) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:763
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:763
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 764. By Victor Thompson
-
merge of trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:764
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Victor Thompson (vthompson) wrote : | # |
#unblocked design has approved this change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Hayzen (ahayzen) wrote : | # |
Looks good so far, visually the only issue I have is that it is difficult to tell where you have to click on the progress bar, as it is black on black.
4 inline diff comments/questions.
- 765. By Victor Thompson
-
update per comments.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Victor Thompson (vthompson) wrote : | # |
I've pushed changes with resolutions to the inline comments.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Andrew Hayzen (ahayzen) wrote : | # |
Awesome really good to see the designs land :)
Preview Diff
1 | === modified file 'MusicNowPlaying.qml' | |||
2 | --- MusicNowPlaying.qml 2015-01-14 05:07:22 +0000 | |||
3 | +++ MusicNowPlaying.qml 2015-01-18 00:06:21 +0000 | |||
4 | @@ -191,32 +191,49 @@ | |||
5 | 191 | 191 | ||
6 | 192 | Item { | 192 | Item { |
7 | 193 | id: fullview | 193 | id: fullview |
9 | 194 | anchors.fill: parent | 194 | anchors { |
10 | 195 | top: parent.top | ||
11 | 196 | topMargin: mainView.header.height | ||
12 | 197 | } | ||
13 | 198 | height: parent.height - mainView.header.height - units.gu(9.5) | ||
14 | 195 | visible: !isListView | 199 | visible: !isListView |
15 | 200 | width: parent.width | ||
16 | 196 | 201 | ||
17 | 197 | BlurredBackground { | 202 | BlurredBackground { |
18 | 198 | id: blurredBackground | 203 | id: blurredBackground |
22 | 199 | anchors.top: parent.top | 204 | anchors { |
23 | 200 | anchors.topMargin: mainView.header.height | 205 | left: parent.left |
24 | 201 | height: units.gu(27) | 206 | right: parent.right |
25 | 207 | top: parent.top | ||
26 | 208 | } | ||
27 | 202 | art: albumImage.firstSource | 209 | art: albumImage.firstSource |
31 | 203 | 210 | height: parent.height - units.gu(7) | |
32 | 204 | CoverGrid { | 211 | |
33 | 205 | id: albumImage | 212 | Item { |
34 | 213 | id: albumImageContainer | ||
35 | 206 | anchors { | 214 | anchors { |
49 | 207 | centerIn: parent | 215 | horizontalCenter: parent.horizontalCenter |
50 | 208 | } | 216 | top: parent.top |
51 | 209 | covers: [{art: player.currentMetaArt, author: player.currentMetaArtist, album: player.currentMetaAlbum}] | 217 | } |
52 | 210 | size: units.gu(18) | 218 | height: parent.height |
53 | 211 | } | 219 | width: parent.width |
54 | 212 | } | 220 | |
55 | 213 | 221 | CoverGrid { | |
56 | 214 | /* Full toolbar */ | 222 | id: albumImage |
57 | 215 | Item { | 223 | anchors.centerIn: parent |
58 | 216 | id: musicToolbarFullContainer | 224 | covers: [{art: player.currentMetaArt, author: player.currentMetaArtist, album: player.currentMetaAlbum}] |
59 | 217 | anchors.top: blurredBackground.bottom | 225 | size: parent.width > parent.height ? parent.height : parent.width |
60 | 218 | anchors.topMargin: nowPlayingWideAspectTitle.lineCount === 1 ? units.gu(4) : units.gu(2) | 226 | } |
61 | 219 | width: blurredBackground.width | 227 | } |
62 | 228 | |||
63 | 229 | Rectangle { | ||
64 | 230 | id: nowPlayingWideAspectLabelsBackground | ||
65 | 231 | anchors.bottom: parent.bottom | ||
66 | 232 | color: styleMusic.common.black | ||
67 | 233 | height: nowPlayingWideAspectTitle.lineCount === 1 ? units.gu(10) : units.gu(13) | ||
68 | 234 | opacity: 0.8 | ||
69 | 235 | width: parent.width | ||
70 | 236 | } | ||
71 | 220 | 237 | ||
72 | 221 | /* Column for labels in wideAspect */ | 238 | /* Column for labels in wideAspect */ |
73 | 222 | Column { | 239 | Column { |
74 | @@ -227,6 +244,8 @@ | |||
75 | 227 | leftMargin: units.gu(2) | 244 | leftMargin: units.gu(2) |
76 | 228 | right: parent.right | 245 | right: parent.right |
77 | 229 | rightMargin: units.gu(2) | 246 | rightMargin: units.gu(2) |
78 | 247 | top: nowPlayingWideAspectLabelsBackground.top | ||
79 | 248 | topMargin: nowPlayingWideAspectTitle.lineCount === 1 ? units.gu(2) : units.gu(1.5) | ||
80 | 230 | } | 249 | } |
81 | 231 | 250 | ||
82 | 232 | /* Title of track */ | 251 | /* Title of track */ |
83 | @@ -263,224 +282,137 @@ | |||
84 | 263 | } | 282 | } |
85 | 264 | } | 283 | } |
86 | 265 | 284 | ||
88 | 266 | /* Progress bar component */ | 285 | /* Detect cover art swipe */ |
89 | 267 | MouseArea { | 286 | MouseArea { |
93 | 268 | id: musicToolbarFullProgressContainer | 287 | anchors.fill: parent |
94 | 269 | anchors.left: parent.left | 288 | property string direction: "None" |
95 | 270 | anchors.leftMargin: units.gu(3) | 289 | property real lastX: -1 |
96 | 290 | |||
97 | 291 | onPressed: lastX = mouse.x | ||
98 | 292 | |||
99 | 293 | onReleased: { | ||
100 | 294 | var diff = mouse.x - lastX | ||
101 | 295 | if (Math.abs(diff) < units.gu(4)) { | ||
102 | 296 | return; | ||
103 | 297 | } else if (diff < 0) { | ||
104 | 298 | player.previousSong() | ||
105 | 299 | } else if (diff > 0) { | ||
106 | 300 | player.nextSong() | ||
107 | 301 | } | ||
108 | 302 | } | ||
109 | 303 | } | ||
110 | 304 | } | ||
111 | 305 | |||
112 | 306 | /* Background for progress bar component */ | ||
113 | 307 | Rectangle { | ||
114 | 308 | id: musicToolbarFullProgressBackground | ||
115 | 309 | anchors { | ||
116 | 310 | bottom: parent.bottom | ||
117 | 311 | left: parent.left | ||
118 | 312 | right: parent.right | ||
119 | 313 | top: blurredBackground.bottom | ||
120 | 314 | } | ||
121 | 315 | color: styleMusic.common.black | ||
122 | 316 | } | ||
123 | 317 | |||
124 | 318 | /* Progress bar component */ | ||
125 | 319 | Item { | ||
126 | 320 | id: musicToolbarFullProgressContainer | ||
127 | 321 | anchors.left: parent.left | ||
128 | 322 | anchors.leftMargin: units.gu(3) | ||
129 | 323 | anchors.right: parent.right | ||
130 | 324 | anchors.rightMargin: units.gu(3) | ||
131 | 325 | anchors.top: blurredBackground.bottom | ||
132 | 326 | anchors.topMargin: units.gu(1) | ||
133 | 327 | height: units.gu(3) | ||
134 | 328 | width: parent.width | ||
135 | 329 | |||
136 | 330 | /* Position label */ | ||
137 | 331 | Label { | ||
138 | 332 | id: musicToolbarFullPositionLabel | ||
139 | 333 | anchors.top: progressSliderMusic.bottom | ||
140 | 334 | anchors.topMargin: units.gu(-2) | ||
141 | 335 | anchors.left: parent.left | ||
142 | 336 | color: styleMusic.nowPlaying.labelSecondaryColor | ||
143 | 337 | fontSize: "small" | ||
144 | 338 | height: parent.height | ||
145 | 339 | horizontalAlignment: Text.AlignHCenter | ||
146 | 340 | text: durationToString(player.position) | ||
147 | 341 | verticalAlignment: Text.AlignVCenter | ||
148 | 342 | width: units.gu(3) | ||
149 | 343 | } | ||
150 | 344 | |||
151 | 345 | Slider { | ||
152 | 346 | id: progressSliderMusic | ||
153 | 347 | anchors.left: parent.left | ||
154 | 271 | anchors.right: parent.right | 348 | anchors.right: parent.right |
198 | 272 | anchors.rightMargin: units.gu(3) | 349 | maximumValue: player.duration // load value at startup |
199 | 273 | anchors.top: nowPlayingWideAspectLabels.bottom | 350 | objectName: "progressSliderShape" |
200 | 274 | anchors.topMargin: nowPlayingWideAspectTitle.lineCount === 1 ? units.gu(3) : units.gu(1.5) | 351 | style: UbuntuBlueSliderStyle {} |
201 | 275 | height: units.gu(3) | 352 | value: player.position // load value at startup |
202 | 276 | width: parent.width | 353 | |
203 | 277 | 354 | function formatValue(v) { | |
204 | 278 | /* Position label */ | 355 | if (seeking) { // update position label while dragging |
205 | 279 | Label { | 356 | musicToolbarFullPositionLabel.text = durationToString(v) |
206 | 280 | id: musicToolbarFullPositionLabel | 357 | } |
207 | 281 | anchors.top: progressSliderMusic.bottom | 358 | |
208 | 282 | anchors.topMargin: units.gu(-2) | 359 | return durationToString(v) |
209 | 283 | anchors.left: parent.left | 360 | } |
210 | 284 | color: styleMusic.nowPlaying.labelSecondaryColor | 361 | |
211 | 285 | fontSize: "small" | 362 | property bool seeking: false |
212 | 286 | height: parent.height | 363 | property bool seeked: false |
213 | 287 | horizontalAlignment: Text.AlignHCenter | 364 | |
214 | 288 | text: durationToString(player.position) | 365 | onSeekingChanged: { |
215 | 289 | verticalAlignment: Text.AlignVCenter | 366 | if (seeking === false) { |
216 | 290 | width: units.gu(3) | 367 | musicToolbarFullPositionLabel.text = durationToString(player.position) |
217 | 291 | } | 368 | } |
218 | 292 | 369 | } | |
219 | 293 | Slider { | 370 | |
220 | 294 | id: progressSliderMusic | 371 | onPressedChanged: { |
221 | 295 | anchors.left: parent.left | 372 | seeking = pressed |
222 | 296 | anchors.right: parent.right | 373 | |
223 | 297 | maximumValue: player.duration // load value at startup | 374 | if (!pressed) { |
224 | 298 | objectName: "progressSliderShape" | 375 | seeked = true |
225 | 299 | style: UbuntuBlueSliderStyle {} | 376 | player.seek(value) |
226 | 300 | value: player.position // load value at startup | 377 | |
227 | 301 | 378 | musicToolbarFullPositionLabel.text = durationToString(value) | |
228 | 302 | function formatValue(v) { | 379 | } |
229 | 303 | if (seeking) { // update position label while dragging | 380 | } |
230 | 304 | musicToolbarFullPositionLabel.text = durationToString(v) | 381 | |
231 | 305 | } | 382 | Connections { |
232 | 306 | 383 | target: player | |
233 | 307 | return durationToString(v) | 384 | onPositionChanged: { |
234 | 308 | } | 385 | // seeked is a workaround for bug 1310706 as the first position after a seek is sometimes invalid (0) |
235 | 309 | 386 | if (progressSliderMusic.seeking === false && !progressSliderMusic.seeked) { | |
193 | 310 | property bool seeking: false | ||
194 | 311 | property bool seeked: false | ||
195 | 312 | |||
196 | 313 | onSeekingChanged: { | ||
197 | 314 | if (seeking === false) { | ||
236 | 315 | musicToolbarFullPositionLabel.text = durationToString(player.position) | 387 | musicToolbarFullPositionLabel.text = durationToString(player.position) |
405 | 316 | } | 388 | musicToolbarFullDurationLabel.text = durationToString(player.duration) |
406 | 317 | } | 389 | |
407 | 318 | 390 | progressSliderMusic.value = player.position | |
408 | 319 | onPressedChanged: { | 391 | progressSliderMusic.maximumValue = player.duration |
409 | 320 | seeking = pressed | 392 | } |
410 | 321 | 393 | ||
411 | 322 | if (!pressed) { | 394 | progressSliderMusic.seeked = false; |
412 | 323 | seeked = true | 395 | } |
413 | 324 | player.seek(value) | 396 | onStopped: { |
414 | 325 | 397 | musicToolbarFullPositionLabel.text = durationToString(0); | |
415 | 326 | musicToolbarFullPositionLabel.text = durationToString(value) | 398 | musicToolbarFullDurationLabel.text = durationToString(0); |
416 | 327 | } | 399 | } |
417 | 328 | } | 400 | } |
418 | 329 | 401 | } | |
419 | 330 | Connections { | 402 | |
420 | 331 | target: player | 403 | /* Duration label */ |
421 | 332 | onPositionChanged: { | 404 | Label { |
422 | 333 | // seeked is a workaround for bug 1310706 as the first position after a seek is sometimes invalid (0) | 405 | id: musicToolbarFullDurationLabel |
423 | 334 | if (progressSliderMusic.seeking === false && !progressSliderMusic.seeked) { | 406 | anchors.top: progressSliderMusic.bottom |
424 | 335 | musicToolbarFullPositionLabel.text = durationToString(player.position) | 407 | anchors.topMargin: units.gu(-2) |
425 | 336 | musicToolbarFullDurationLabel.text = durationToString(player.duration) | 408 | anchors.right: parent.right |
426 | 337 | 409 | color: styleMusic.nowPlaying.labelSecondaryColor | |
427 | 338 | progressSliderMusic.value = player.position | 410 | fontSize: "small" |
428 | 339 | progressSliderMusic.maximumValue = player.duration | 411 | height: parent.height |
429 | 340 | } | 412 | horizontalAlignment: Text.AlignHCenter |
430 | 341 | 413 | text: durationToString(player.duration) | |
431 | 342 | progressSliderMusic.seeked = false; | 414 | verticalAlignment: Text.AlignVCenter |
432 | 343 | } | 415 | width: units.gu(3) |
265 | 344 | onStopped: { | ||
266 | 345 | musicToolbarFullPositionLabel.text = durationToString(0); | ||
267 | 346 | musicToolbarFullDurationLabel.text = durationToString(0); | ||
268 | 347 | } | ||
269 | 348 | } | ||
270 | 349 | } | ||
271 | 350 | |||
272 | 351 | /* Duration label */ | ||
273 | 352 | Label { | ||
274 | 353 | id: musicToolbarFullDurationLabel | ||
275 | 354 | anchors.top: progressSliderMusic.bottom | ||
276 | 355 | anchors.topMargin: units.gu(-2) | ||
277 | 356 | anchors.right: parent.right | ||
278 | 357 | color: styleMusic.nowPlaying.labelSecondaryColor | ||
279 | 358 | fontSize: "small" | ||
280 | 359 | height: parent.height | ||
281 | 360 | horizontalAlignment: Text.AlignHCenter | ||
282 | 361 | text: durationToString(player.duration) | ||
283 | 362 | verticalAlignment: Text.AlignVCenter | ||
284 | 363 | width: units.gu(3) | ||
285 | 364 | } | ||
286 | 365 | } | ||
287 | 366 | |||
288 | 367 | /* Repeat button */ | ||
289 | 368 | MouseArea { | ||
290 | 369 | id: nowPlayingRepeatButton | ||
291 | 370 | anchors.right: nowPlayingPreviousButton.left | ||
292 | 371 | anchors.rightMargin: units.gu(1) | ||
293 | 372 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
294 | 373 | height: units.gu(6) | ||
295 | 374 | opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 | ||
296 | 375 | width: height | ||
297 | 376 | onClicked: player.repeat = !player.repeat | ||
298 | 377 | |||
299 | 378 | Icon { | ||
300 | 379 | id: repeatIcon | ||
301 | 380 | height: units.gu(3) | ||
302 | 381 | width: height | ||
303 | 382 | anchors.verticalCenter: parent.verticalCenter | ||
304 | 383 | anchors.horizontalCenter: parent.horizontalCenter | ||
305 | 384 | color: "white" | ||
306 | 385 | name: "media-playlist-repeat" | ||
307 | 386 | objectName: "repeatShape" | ||
308 | 387 | opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 | ||
309 | 388 | } | ||
310 | 389 | } | ||
311 | 390 | |||
312 | 391 | /* Previous button */ | ||
313 | 392 | MouseArea { | ||
314 | 393 | id: nowPlayingPreviousButton | ||
315 | 394 | anchors.right: nowPlayingPlayButton.left | ||
316 | 395 | anchors.rightMargin: units.gu(1) | ||
317 | 396 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
318 | 397 | height: units.gu(6) | ||
319 | 398 | opacity: trackQueue.model.count === 0 ? .4 : 1 | ||
320 | 399 | width: height | ||
321 | 400 | onClicked: player.previousSong() | ||
322 | 401 | |||
323 | 402 | Icon { | ||
324 | 403 | id: nowPlayingPreviousIndicator | ||
325 | 404 | height: units.gu(3) | ||
326 | 405 | width: height | ||
327 | 406 | anchors.verticalCenter: parent.verticalCenter | ||
328 | 407 | anchors.horizontalCenter: parent.horizontalCenter | ||
329 | 408 | color: "white" | ||
330 | 409 | name: "media-skip-backward" | ||
331 | 410 | objectName: "previousShape" | ||
332 | 411 | opacity: 1 | ||
333 | 412 | } | ||
334 | 413 | } | ||
335 | 414 | |||
336 | 415 | /* Play/Pause button */ | ||
337 | 416 | MouseArea { | ||
338 | 417 | id: nowPlayingPlayButton | ||
339 | 418 | anchors.horizontalCenter: parent.horizontalCenter | ||
340 | 419 | anchors.top: musicToolbarFullProgressContainer.bottom | ||
341 | 420 | anchors.topMargin: units.gu(2) | ||
342 | 421 | height: units.gu(12) | ||
343 | 422 | width: height | ||
344 | 423 | onClicked: player.toggle() | ||
345 | 424 | |||
346 | 425 | Icon { | ||
347 | 426 | id: nowPlayingPlayIndicator | ||
348 | 427 | height: units.gu(6) | ||
349 | 428 | width: height | ||
350 | 429 | anchors.verticalCenter: parent.verticalCenter | ||
351 | 430 | anchors.horizontalCenter: parent.horizontalCenter | ||
352 | 431 | opacity: emptyPage.noMusic ? .4 : 1 | ||
353 | 432 | color: "white" | ||
354 | 433 | name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" | ||
355 | 434 | objectName: "playShape" | ||
356 | 435 | } | ||
357 | 436 | } | ||
358 | 437 | |||
359 | 438 | /* Next button */ | ||
360 | 439 | MouseArea { | ||
361 | 440 | id: nowPlayingNextButton | ||
362 | 441 | anchors.left: nowPlayingPlayButton.right | ||
363 | 442 | anchors.leftMargin: units.gu(1) | ||
364 | 443 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
365 | 444 | height: units.gu(6) | ||
366 | 445 | opacity: trackQueue.model.count === 0 ? .4 : 1 | ||
367 | 446 | width: height | ||
368 | 447 | onClicked: player.nextSong() | ||
369 | 448 | |||
370 | 449 | Icon { | ||
371 | 450 | id: nowPlayingNextIndicator | ||
372 | 451 | height: units.gu(3) | ||
373 | 452 | width: height | ||
374 | 453 | anchors.verticalCenter: parent.verticalCenter | ||
375 | 454 | anchors.horizontalCenter: parent.horizontalCenter | ||
376 | 455 | color: "white" | ||
377 | 456 | name: "media-skip-forward" | ||
378 | 457 | objectName: "forwardShape" | ||
379 | 458 | opacity: 1 | ||
380 | 459 | } | ||
381 | 460 | } | ||
382 | 461 | |||
383 | 462 | /* Shuffle button */ | ||
384 | 463 | MouseArea { | ||
385 | 464 | id: nowPlayingShuffleButton | ||
386 | 465 | anchors.left: nowPlayingNextButton.right | ||
387 | 466 | anchors.leftMargin: units.gu(1) | ||
388 | 467 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
389 | 468 | height: units.gu(6) | ||
390 | 469 | opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 | ||
391 | 470 | width: height | ||
392 | 471 | onClicked: player.shuffle = !player.shuffle | ||
393 | 472 | |||
394 | 473 | Icon { | ||
395 | 474 | id: shuffleIcon | ||
396 | 475 | height: units.gu(3) | ||
397 | 476 | width: height | ||
398 | 477 | anchors.verticalCenter: parent.verticalCenter | ||
399 | 478 | anchors.horizontalCenter: parent.horizontalCenter | ||
400 | 479 | color: "white" | ||
401 | 480 | name: "media-playlist-shuffle" | ||
402 | 481 | objectName: "shuffleShape" | ||
403 | 482 | opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 | ||
404 | 483 | } | ||
433 | 484 | } | 416 | } |
434 | 485 | } | 417 | } |
435 | 486 | } | 418 | } |
436 | @@ -569,7 +501,7 @@ | |||
437 | 569 | sourceComponent: ListView { | 501 | sourceComponent: ListView { |
438 | 570 | id: queueList | 502 | id: queueList |
439 | 571 | anchors { | 503 | anchors { |
441 | 572 | bottomMargin: units.gu(2) | 504 | bottomMargin: musicToolbarFullContainer.height + units.gu(2) |
442 | 573 | fill: parent | 505 | fill: parent |
443 | 574 | topMargin: units.gu(2) | 506 | topMargin: units.gu(2) |
444 | 575 | } | 507 | } |
445 | @@ -628,7 +560,7 @@ | |||
446 | 628 | id: queueDelegate | 560 | id: queueDelegate |
447 | 629 | ListItemWithActions { | 561 | ListItemWithActions { |
448 | 630 | id: queueListItem | 562 | id: queueListItem |
450 | 631 | color: player.currentIndex === index ? "#2c2c34" : mainView.backgroundColor | 563 | color: player.currentIndex === index ? "#2c2c34" : styleMusic.mainView.backgroundColor |
451 | 632 | height: queueList.normalHeight | 564 | height: queueList.normalHeight |
452 | 633 | objectName: "nowPlayingListItem" + index | 565 | objectName: "nowPlayingListItem" + index |
453 | 634 | state: "" | 566 | state: "" |
454 | @@ -718,4 +650,164 @@ | |||
455 | 718 | } | 650 | } |
456 | 719 | visible: isListView | 651 | visible: isListView |
457 | 720 | } | 652 | } |
458 | 653 | |||
459 | 654 | /* Full toolbar */ | ||
460 | 655 | Rectangle { | ||
461 | 656 | id: musicToolbarFullContainer | ||
462 | 657 | anchors.bottom: parent.bottom | ||
463 | 658 | color: styleMusic.common.black | ||
464 | 659 | height: units.gu(10) | ||
465 | 660 | width: parent.width | ||
466 | 661 | |||
467 | 662 | /* Repeat button */ | ||
468 | 663 | MouseArea { | ||
469 | 664 | id: nowPlayingRepeatButton | ||
470 | 665 | anchors.right: nowPlayingPreviousButton.left | ||
471 | 666 | anchors.rightMargin: units.gu(1) | ||
472 | 667 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
473 | 668 | height: units.gu(6) | ||
474 | 669 | opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 | ||
475 | 670 | width: height | ||
476 | 671 | onClicked: player.repeat = !player.repeat | ||
477 | 672 | |||
478 | 673 | Icon { | ||
479 | 674 | id: repeatIcon | ||
480 | 675 | height: units.gu(3) | ||
481 | 676 | width: height | ||
482 | 677 | anchors.verticalCenter: parent.verticalCenter | ||
483 | 678 | anchors.horizontalCenter: parent.horizontalCenter | ||
484 | 679 | color: "white" | ||
485 | 680 | name: "media-playlist-repeat" | ||
486 | 681 | objectName: "repeatShape" | ||
487 | 682 | opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 | ||
488 | 683 | } | ||
489 | 684 | } | ||
490 | 685 | |||
491 | 686 | /* Previous button */ | ||
492 | 687 | MouseArea { | ||
493 | 688 | id: nowPlayingPreviousButton | ||
494 | 689 | anchors.right: nowPlayingPlayButton.left | ||
495 | 690 | anchors.rightMargin: units.gu(1) | ||
496 | 691 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
497 | 692 | height: units.gu(6) | ||
498 | 693 | opacity: trackQueue.model.count === 0 ? .4 : 1 | ||
499 | 694 | width: height | ||
500 | 695 | onClicked: player.previousSong() | ||
501 | 696 | |||
502 | 697 | Icon { | ||
503 | 698 | id: nowPlayingPreviousIndicator | ||
504 | 699 | height: units.gu(3) | ||
505 | 700 | width: height | ||
506 | 701 | anchors.verticalCenter: parent.verticalCenter | ||
507 | 702 | anchors.horizontalCenter: parent.horizontalCenter | ||
508 | 703 | color: "white" | ||
509 | 704 | name: "media-skip-backward" | ||
510 | 705 | objectName: "previousShape" | ||
511 | 706 | opacity: 1 | ||
512 | 707 | } | ||
513 | 708 | } | ||
514 | 709 | |||
515 | 710 | /* Play/Pause button */ | ||
516 | 711 | MouseArea { | ||
517 | 712 | id: nowPlayingPlayButton | ||
518 | 713 | anchors.centerIn: parent | ||
519 | 714 | height: units.gu(10) | ||
520 | 715 | width: height | ||
521 | 716 | onClicked: player.toggle() | ||
522 | 717 | |||
523 | 718 | Icon { | ||
524 | 719 | id: nowPlayingPlayIndicator | ||
525 | 720 | height: units.gu(6) | ||
526 | 721 | width: height | ||
527 | 722 | anchors.verticalCenter: parent.verticalCenter | ||
528 | 723 | anchors.horizontalCenter: parent.horizontalCenter | ||
529 | 724 | opacity: emptyPage.noMusic ? .4 : 1 | ||
530 | 725 | color: "white" | ||
531 | 726 | name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" | ||
532 | 727 | objectName: "playShape" | ||
533 | 728 | } | ||
534 | 729 | } | ||
535 | 730 | |||
536 | 731 | /* Next button */ | ||
537 | 732 | MouseArea { | ||
538 | 733 | id: nowPlayingNextButton | ||
539 | 734 | anchors.left: nowPlayingPlayButton.right | ||
540 | 735 | anchors.leftMargin: units.gu(1) | ||
541 | 736 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
542 | 737 | height: units.gu(6) | ||
543 | 738 | opacity: trackQueue.model.count === 0 ? .4 : 1 | ||
544 | 739 | width: height | ||
545 | 740 | onClicked: player.nextSong() | ||
546 | 741 | |||
547 | 742 | Icon { | ||
548 | 743 | id: nowPlayingNextIndicator | ||
549 | 744 | height: units.gu(3) | ||
550 | 745 | width: height | ||
551 | 746 | anchors.verticalCenter: parent.verticalCenter | ||
552 | 747 | anchors.horizontalCenter: parent.horizontalCenter | ||
553 | 748 | color: "white" | ||
554 | 749 | name: "media-skip-forward" | ||
555 | 750 | objectName: "forwardShape" | ||
556 | 751 | opacity: 1 | ||
557 | 752 | } | ||
558 | 753 | } | ||
559 | 754 | |||
560 | 755 | /* Shuffle button */ | ||
561 | 756 | MouseArea { | ||
562 | 757 | id: nowPlayingShuffleButton | ||
563 | 758 | anchors.left: nowPlayingNextButton.right | ||
564 | 759 | anchors.leftMargin: units.gu(1) | ||
565 | 760 | anchors.verticalCenter: nowPlayingPlayButton.verticalCenter | ||
566 | 761 | height: units.gu(6) | ||
567 | 762 | opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 | ||
568 | 763 | width: height | ||
569 | 764 | onClicked: player.shuffle = !player.shuffle | ||
570 | 765 | |||
571 | 766 | Icon { | ||
572 | 767 | id: shuffleIcon | ||
573 | 768 | height: units.gu(3) | ||
574 | 769 | width: height | ||
575 | 770 | anchors.verticalCenter: parent.verticalCenter | ||
576 | 771 | anchors.horizontalCenter: parent.horizontalCenter | ||
577 | 772 | color: "white" | ||
578 | 773 | name: "media-playlist-shuffle" | ||
579 | 774 | objectName: "shuffleShape" | ||
580 | 775 | opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 | ||
581 | 776 | } | ||
582 | 777 | } | ||
583 | 778 | |||
584 | 779 | /* Object which provides the progress bar when in the queue */ | ||
585 | 780 | Rectangle { | ||
586 | 781 | id: playerControlsProgressBar | ||
587 | 782 | anchors { | ||
588 | 783 | bottom: parent.bottom | ||
589 | 784 | left: parent.left | ||
590 | 785 | right: parent.right | ||
591 | 786 | } | ||
592 | 787 | color: styleMusic.common.black | ||
593 | 788 | height: units.gu(0.25) | ||
594 | 789 | visible: isListView | ||
595 | 790 | |||
596 | 791 | Rectangle { | ||
597 | 792 | id: playerControlsProgressBarHint | ||
598 | 793 | anchors { | ||
599 | 794 | left: parent.left | ||
600 | 795 | bottom: parent.bottom | ||
601 | 796 | } | ||
602 | 797 | color: UbuntuColors.blue | ||
603 | 798 | height: parent.height | ||
604 | 799 | width: 0 | ||
605 | 800 | |||
606 | 801 | Connections { | ||
607 | 802 | target: player | ||
608 | 803 | onPositionChanged: { | ||
609 | 804 | playerControlsProgressBarHint.width = (player.position / player.duration) * playerControlsProgressBar.width | ||
610 | 805 | } | ||
611 | 806 | onStopped: { | ||
612 | 807 | playerControlsProgressBarHint.width = 0; | ||
613 | 808 | } | ||
614 | 809 | } | ||
615 | 810 | } | ||
616 | 811 | } | ||
617 | 812 | } | ||
618 | 721 | } | 813 | } |
619 | 722 | 814 | ||
620 | === modified file 'Style.qml' | |||
621 | --- Style.qml 2015-01-16 22:51:25 +0000 | |||
622 | +++ Style.qml 2015-01-18 00:06:21 +0000 | |||
623 | @@ -1,5 +1,5 @@ | |||
624 | 1 | /* | 1 | /* |
626 | 2 | * Copyright (C) 2013, 2014 | 2 | * Copyright (C) 2013, 2014, 2015 |
627 | 3 | * Andrew Hayzen <ahayzen@gmail.com> | 3 | * Andrew Hayzen <ahayzen@gmail.com> |
628 | 4 | * Daniel Holm <d.holmen@gmail.com> | 4 | * Daniel Holm <d.holmen@gmail.com> |
629 | 5 | * Victor Thompson <victor.thompson@gmail.com> | 5 | * Victor Thompson <victor.thompson@gmail.com> |
630 | @@ -62,9 +62,9 @@ | |||
631 | 62 | } | 62 | } |
632 | 63 | 63 | ||
633 | 64 | property QtObject mainView: QtObject{ | 64 | property QtObject mainView: QtObject{ |
637 | 65 | property color backgroundColor: "#A55263"; | 65 | property color backgroundColor: "#1e1e23" |
638 | 66 | property color footerColor: "#D75669"; | 66 | property color footerColor: backgroundColor |
639 | 67 | property color headerColor: "#57365E"; | 67 | property color headerColor: backgroundColor |
640 | 68 | } | 68 | } |
641 | 69 | 69 | ||
642 | 70 | property QtObject nowPlaying: QtObject { | 70 | property QtObject nowPlaying: QtObject { |
643 | 71 | 71 | ||
644 | === modified file 'common/ListItemWithActions.qml' | |||
645 | --- common/ListItemWithActions.qml 2015-01-09 18:28:14 +0000 | |||
646 | +++ common/ListItemWithActions.qml 2015-01-18 00:06:21 +0000 | |||
647 | @@ -1,5 +1,5 @@ | |||
648 | 1 | /* | 1 | /* |
650 | 2 | * Copyright (C) 2012-2014 Canonical, Ltd. | 2 | * Copyright (C) 2012-2015 Canonical, Ltd. |
651 | 3 | * | 3 | * |
652 | 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
653 | 5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
654 | @@ -30,7 +30,7 @@ | |||
655 | 30 | property Action activeAction: null | 30 | property Action activeAction: null |
656 | 31 | property var activeItem: null | 31 | property var activeItem: null |
657 | 32 | property bool triggerActionOnMouseRelease: false | 32 | property bool triggerActionOnMouseRelease: false |
659 | 33 | property color color: "#1e1e23" | 33 | property color color: styleMusic.mainView.backgroundColor |
660 | 34 | property color selectedColor: "#3d3d45" // "#E6E6E6" // CUSTOM | 34 | property color selectedColor: "#3d3d45" // "#E6E6E6" // CUSTOM |
661 | 35 | property bool selected: false | 35 | property bool selected: false |
662 | 36 | property bool selectionMode: false | 36 | property bool selectionMode: false |
663 | 37 | 37 | ||
664 | === modified file 'music-app.qml' | |||
665 | --- music-app.qml 2015-01-16 22:51:25 +0000 | |||
666 | +++ music-app.qml 2015-01-18 00:06:21 +0000 | |||
667 | @@ -38,8 +38,8 @@ | |||
668 | 38 | id: mainView | 38 | id: mainView |
669 | 39 | useDeprecatedToolbar: false | 39 | useDeprecatedToolbar: false |
670 | 40 | 40 | ||
673 | 41 | backgroundColor: "#1e1e23" | 41 | backgroundColor: styleMusic.mainView.backgroundColor |
674 | 42 | headerColor: "#1e1e23" | 42 | headerColor: styleMusic.mainView.headerColor |
675 | 43 | 43 | ||
676 | 44 | // Startup settings | 44 | // Startup settings |
677 | 45 | Settings { | 45 | Settings { |
678 | @@ -886,7 +886,8 @@ | |||
679 | 886 | 886 | ||
680 | 887 | MusicToolbar { | 887 | MusicToolbar { |
681 | 888 | id: musicToolbar | 888 | id: musicToolbar |
683 | 889 | visible: mainPageStack.currentPage.title !== i18n.tr("Now playing") | 889 | visible: mainPageStack.currentPage.title !== i18n.tr("Now playing") && |
684 | 890 | mainPageStack.currentPage.title !== i18n.tr("Queue") | ||
685 | 890 | objectName: "musicToolbarObject" | 891 | objectName: "musicToolbarObject" |
686 | 891 | z: 200 // put on top of everything else | 892 | z: 200 // put on top of everything else |
687 | 892 | } | 893 | } |
#blocked Design input