Merge lp:~ahayzen/music-app/remix-small-toolbar-always-show into lp:music-app/remix
- remix-small-toolbar-always-show
- Merge into remix
Proposed by
Andrew Hayzen
Status: | Superseded |
---|---|
Proposed branch: | lp:~ahayzen/music-app/remix-small-toolbar-always-show |
Merge into: | lp:music-app/remix |
Diff against target: |
1181 lines (+265/-464) 12 files modified
MusicArtists.qml (+3/-2) MusicNowPlaying.qml (+3/-10) MusicPlaylists.qml (+3/-2) MusicSettings.qml (+0/-11) MusicToolbar.qml (+196/-362) MusicTracks.qml (+3/-2) MusicaddtoPlaylist.qml (+0/-1) common/AlbumsPage.qml (+0/-2) common/MusicPage.qml (+4/-0) common/SongsPage.qml (+0/-2) music-app.qml (+1/-18) po/com.ubuntu.music.pot (+52/-52) |
To merge this branch: | bzr merge lp:~ahayzen/music-app/remix-small-toolbar-always-show |
Related bugs: | |
Related blueprints: |
Music Remix for RTM
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Music App Developers | Pending | ||
Review via email:
|
Commit message
* Fix the toolbar so it is always shown
Description of the change
* Fix the toolbar so it is always shown
This fixes the toolbar so that it is always shown and sets the bottom margin of MusicPage to the height of the toolbar (so you can scroll to the bottom).
Note that this makes the "larger" toolbar always visible in the now playing page and this will be changed when we start work on the new now playing design.
To post a comment you must log in.
- 643. By Andrew Hayzen
-
* Merge from lp:~andrew-hayzen/music-app/remix-small-toolbar-design
- 644. By Andrew Hayzen
-
* Switch progress bar position
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'MusicArtists.qml' |
2 | --- MusicArtists.qml 2014-09-20 15:41:33 +0000 |
3 | +++ MusicArtists.qml 2014-09-30 15:34:08 +0000 |
4 | @@ -38,8 +38,9 @@ |
5 | |
6 | ListView { |
7 | id: artistlist |
8 | - anchors.fill: parent |
9 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
10 | + anchors { |
11 | + fill: parent |
12 | + } |
13 | model: ArtistsModel { |
14 | id: artistsModel |
15 | albumArtists: true |
16 | |
17 | === modified file 'MusicNowPlaying.qml' |
18 | --- MusicNowPlaying.qml 2014-09-20 15:41:33 +0000 |
19 | +++ MusicNowPlaying.qml 2014-09-30 15:34:08 +0000 |
20 | @@ -44,10 +44,6 @@ |
21 | } |
22 | } |
23 | |
24 | - Component.onCompleted: { |
25 | - onToolbarShownChanged.connect(jumpToCurrent) |
26 | - } |
27 | - |
28 | Connections { |
29 | target: player |
30 | onCurrentIndexChanged: { |
31 | @@ -83,8 +79,9 @@ |
32 | ListView { |
33 | id: queuelist |
34 | objectName: "nowPlayingQueueList" |
35 | - anchors.fill: parent |
36 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
37 | + anchors { |
38 | + fill: parent |
39 | + } |
40 | delegate: queueDelegate |
41 | model: trackQueue.model |
42 | highlightFollowsCurrentItem: false |
43 | @@ -117,10 +114,6 @@ |
44 | customdebug("Queue: Now has: " + queuelist.count + " tracks") |
45 | } |
46 | |
47 | - onMovementStarted: { |
48 | - musicToolbar.hideToolbar(); |
49 | - } |
50 | - |
51 | Component { |
52 | id: queueDelegate |
53 | ListItemWithActions { |
54 | |
55 | === modified file 'MusicPlaylists.qml' |
56 | --- MusicPlaylists.qml 2014-09-20 10:50:45 +0000 |
57 | +++ MusicPlaylists.qml 2014-09-30 15:34:08 +0000 |
58 | @@ -116,8 +116,9 @@ |
59 | ListView { |
60 | id: playlistslist |
61 | objectName: "playlistsListView" |
62 | - anchors.fill: parent |
63 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
64 | + anchors { |
65 | + fill: parent |
66 | + } |
67 | model: playlistModel.model |
68 | delegate: playlistDelegate |
69 | onCountChanged: { |
70 | |
71 | === modified file 'MusicSettings.qml' |
72 | --- MusicSettings.qml 2014-09-20 10:50:45 +0000 |
73 | +++ MusicSettings.qml 2014-09-30 15:34:08 +0000 |
74 | @@ -30,17 +30,6 @@ |
75 | title: i18n.tr("Settings") |
76 | contentsHeight: parent.height; |
77 | |
78 | - onVisibleChanged: { |
79 | - if (visible === true) |
80 | - { |
81 | - musicToolbar.disableToolbar() |
82 | - } |
83 | - else |
84 | - { |
85 | - musicToolbar.enableToolbar() |
86 | - } |
87 | - } |
88 | - |
89 | onCancelClicked: PopupUtils.close(musicSettings) |
90 | onConfirmClicked: { |
91 | PopupUtils.close(musicSettings) |
92 | |
93 | === modified file 'MusicToolbar.qml' |
94 | --- MusicToolbar.qml 2014-09-23 20:45:41 +0000 |
95 | +++ MusicToolbar.qml 2014-09-30 15:34:08 +0000 |
96 | @@ -43,7 +43,6 @@ |
97 | property int transitionDuration: 100 |
98 | |
99 | property alias currentHeight: musicToolbarPanel.height |
100 | - property alias minimizedHeight: musicToolbarPanel.minimizedHeight |
101 | property alias expandedHeight: musicToolbarPanel.expandedHeight |
102 | property alias fullHeight: musicToolbarPanel.fullHeight |
103 | property alias mouseAreaOffset: musicToolbarPanel.hintSize |
104 | @@ -72,22 +71,6 @@ |
105 | |
106 | /* Helper functions */ |
107 | |
108 | - // Disable the toolbar for this page/view (eg a dialog) |
109 | - function disableToolbar() |
110 | - { |
111 | - cachedStates.push(state); |
112 | - musicToolbarPanel.state = "hidden"; |
113 | - } |
114 | - |
115 | - // Enable the toolbar (run when closing a page that disabled it) |
116 | - function enableToolbar() |
117 | - { |
118 | - if (cachedStates.length > 0) |
119 | - { |
120 | - musicToolbarPanel.state = cachedStates.pop(); |
121 | - } |
122 | - } |
123 | - |
124 | // Back button has been pressed, jump up pageStack or back to parent page |
125 | function goBack() |
126 | { |
127 | @@ -98,18 +81,6 @@ |
128 | else if (mainPageStack !== null && mainPageStack.depth > 1) { |
129 | mainPageStack.pop(currentPage) |
130 | } |
131 | - |
132 | - startAutohideTimer() |
133 | - } |
134 | - |
135 | - // Hide the toolbar |
136 | - function hideToolbar() |
137 | - { |
138 | - if (!wideAspect) { |
139 | - musicToolbarPanel.close(); |
140 | - } |
141 | - |
142 | - toolbarAutoHideTimer.stop(); // cancel any autohide |
143 | } |
144 | |
145 | // Remove sheet as it has been closed |
146 | @@ -135,32 +106,6 @@ |
147 | currentSheet.push(sheet) |
148 | } |
149 | |
150 | - // Show the toolbar |
151 | - function showToolbar() |
152 | - { |
153 | - startAutohideTimer(); // always attempt to autohide toolbar |
154 | - |
155 | - if (!musicToolbarPanel.opened) { |
156 | - musicToolbarPanel.open(); |
157 | - } |
158 | - } |
159 | - |
160 | - // Start the autohidetimer |
161 | - function startAutohideTimer() |
162 | - { |
163 | - toolbarAutoHideTimer.restart(); |
164 | - } |
165 | - |
166 | - Connections { |
167 | - target: mainView |
168 | - onWideAspectChanged: { |
169 | - // Force toolbar to show if in wideAspect |
170 | - if (wideAspect && !opened) { |
171 | - showToolbar(); |
172 | - } |
173 | - } |
174 | - } |
175 | - |
176 | Panel { |
177 | id: musicToolbarPanel |
178 | anchors { |
179 | @@ -169,31 +114,21 @@ |
180 | bottom: parent.bottom |
181 | } |
182 | height: currentMode === "full" ? fullHeight : expandedHeight |
183 | - locked: wideAspect |
184 | - |
185 | - __closeOnContentsClicks: false // TODO: fix bug 1295720 |
186 | + locked: true |
187 | + opened: true |
188 | |
189 | // The current mode of the controls |
190 | property string currentMode: wideAspect || (currentPage === nowPlaying) |
191 | ? "full" : "expanded" |
192 | |
193 | // Properties for the different heights |
194 | - property int minimizedHeight: units.gu(0.5) |
195 | - property int expandedHeight: units.gu(8) |
196 | + property int expandedHeight: units.gu(7.25) |
197 | property int fullHeight: units.gu(11) |
198 | |
199 | onCurrentModeChanged: { |
200 | musicToolbarFullProgressMouseArea.enabled = currentMode === "full" |
201 | } |
202 | |
203 | - onOpenedChanged: { |
204 | - onToolbarShownChanged(opened, currentPage, currentTab); |
205 | - |
206 | - if (opened) { |
207 | - startAutohideTimer(); |
208 | - } |
209 | - } |
210 | - |
211 | /* Full toolbar */ |
212 | Rectangle { |
213 | id: musicToolbarFullContainer |
214 | @@ -717,8 +652,10 @@ |
215 | |
216 | Rectangle { |
217 | id: musicToolbarPlayerControls |
218 | - anchors.fill: parent |
219 | - color: styleMusic.playerControls.backgroundColor |
220 | + anchors { |
221 | + fill: parent |
222 | + } |
223 | + color: "#000" |
224 | state: trackQueue.model.count === 0 ? "disabled" : "enabled" |
225 | states: [ |
226 | State { |
227 | @@ -745,39 +682,88 @@ |
228 | } |
229 | ] |
230 | |
231 | + /* Object which provides the progress bar when toolbar is minimized */ |
232 | + Rectangle { |
233 | + id: playerControlsProgressBar |
234 | + anchors { |
235 | + left: parent.left |
236 | + right: parent.right |
237 | + top: parent.top |
238 | + } |
239 | + color: styleMusic.common.black |
240 | + height: units.gu(0.25) |
241 | + |
242 | + Rectangle { |
243 | + id: playerControlsProgressBarHint |
244 | + anchors { |
245 | + left: parent.left |
246 | + top: parent.top |
247 | + } |
248 | + color: UbuntuColors.blue |
249 | + height: parent.height |
250 | + width: 0 |
251 | + |
252 | + Connections { |
253 | + target: player |
254 | + onPositionChanged: { |
255 | + playerControlsProgressBarHint.width = (player.position / player.duration) * playerControlsProgressBar.width |
256 | + } |
257 | + onStopped: { |
258 | + playerControlsProgressBarHint.width = 0; |
259 | + } |
260 | + } |
261 | + } |
262 | + } |
263 | + |
264 | + /* Disabled (empty state) controls */ |
265 | Rectangle { |
266 | id: disabledPlayerControlsGroup |
267 | - anchors.fill: parent |
268 | + anchors { |
269 | + bottom: parent.bottom |
270 | + left: parent.left |
271 | + right: parent.right |
272 | + top: playerControlsProgressBar.bottom |
273 | + } |
274 | color: "transparent" |
275 | - visible: trackQueue.model.count === 0 |
276 | |
277 | Label { |
278 | id: noSongsInQueueLabel |
279 | anchors { |
280 | left: parent.left |
281 | + leftMargin: units.gu(2) |
282 | right: disabledPlayerControlsPlayButton.left |
283 | - margins: units.gu(1) |
284 | - top: parent.top |
285 | + rightMargin: units.gu(2) |
286 | + verticalCenter: parent.verticalCenter |
287 | } |
288 | color: styleMusic.playerControls.labelColor |
289 | - text: i18n.tr("Tap play to shuffle music") |
290 | + text: i18n.tr("Tap to shuffle music") |
291 | fontSize: "large" |
292 | wrapMode: Text.WordWrap |
293 | maximumLineCount: 2 |
294 | } |
295 | |
296 | - Rectangle { |
297 | + /* Play/Pause button */ |
298 | + Icon { |
299 | id: disabledPlayerControlsPlayButton |
300 | - anchors.right: parent.right |
301 | - anchors.rightMargin: units.gu(1) |
302 | - anchors.verticalCenter: parent.verticalCenter |
303 | - antialiasing: true |
304 | - color: "#444" |
305 | - height: units.gu(7) |
306 | - radius: height / 2 |
307 | + anchors { |
308 | + right: parent.right |
309 | + rightMargin: units.gu(3) |
310 | + verticalCenter: parent.verticalCenter |
311 | + } |
312 | + color: "#FFF" |
313 | + height: units.gu(2.5) |
314 | + name: player.playbackState === MediaPlayer.PlayingState ? |
315 | + "media-playback-pause" : "media-playback-start" |
316 | + objectName: "smallPlayShape" |
317 | width: height |
318 | + } |
319 | |
320 | - function trigger() { |
321 | + /* Click to shuffle music */ |
322 | + MouseArea { |
323 | + anchors { |
324 | + fill: parent |
325 | + } |
326 | + onClicked: { |
327 | if (emptyPage.noMusic) { |
328 | return; |
329 | } |
330 | @@ -789,229 +775,58 @@ |
331 | player.toggle(); |
332 | } |
333 | } |
334 | - |
335 | - // draws the outer shadow/highlight |
336 | - Rectangle { |
337 | - id: disabledSourceOutter |
338 | - anchors { fill: parent; margins: -units.gu(0.1) } |
339 | - radius: (width / 2) |
340 | - antialiasing: true |
341 | - gradient: Gradient { |
342 | - GradientStop { position: 0.0; color: "black" } |
343 | - GradientStop { position: 0.5; color: "transparent" } |
344 | - GradientStop { position: 1.0; color: UbuntuColors.warmGrey } |
345 | - } |
346 | - |
347 | - Rectangle { |
348 | - anchors.verticalCenter: parent.verticalCenter |
349 | - anchors.horizontalCenter: parent.horizontalCenter |
350 | - antialiasing: true |
351 | - color: "#444" |
352 | - height: playerControlsPlayButton.height - units.gu(.1) |
353 | - radius: height / 2 |
354 | - width: height |
355 | - |
356 | - Rectangle { |
357 | - id: disabledPlayerControlsPlayInnerCircle |
358 | - anchors.horizontalCenter: parent.horizontalCenter |
359 | - anchors.verticalCenter: parent.verticalCenter |
360 | - antialiasing: true |
361 | - height: units.gu(4.5) |
362 | - radius: height / 2 |
363 | - width: height |
364 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
365 | - |
366 | - // draws the inner shadow/highlight |
367 | - Rectangle { |
368 | - id: disabledSourceInner |
369 | - anchors { fill: parent; margins: -units.gu(0.1) } |
370 | - radius: (width / 2) |
371 | - antialiasing: true |
372 | - gradient: Gradient { |
373 | - GradientStop { position: 0.0; color: UbuntuColors.warmGrey } |
374 | - GradientStop { position: 0.5; color: "transparent" } |
375 | - GradientStop { position: 1.0; color: "black" } |
376 | - } |
377 | - |
378 | - Rectangle { |
379 | - anchors.verticalCenter: parent.verticalCenter |
380 | - anchors.horizontalCenter: parent.horizontalCenter |
381 | - antialiasing: true |
382 | - height: playerControlsPlayInnerCircle.height - units.gu(.1) |
383 | - radius: height / 2 |
384 | - width: height |
385 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
386 | - |
387 | - Image { |
388 | - id: disabledPlayIndicator |
389 | - height: units.gu(4) |
390 | - width: height |
391 | - anchors.horizontalCenter: parent.horizontalCenter |
392 | - anchors.verticalCenter: parent.verticalCenter |
393 | - opacity: emptyPage.noMusic ? .4 : 1 |
394 | - source: player.playbackState === MediaPlayer.PlayingState ? |
395 | - Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg") |
396 | - } |
397 | - } |
398 | - } |
399 | - } |
400 | - } |
401 | - } |
402 | } |
403 | } |
404 | |
405 | Rectangle { |
406 | id: enabledPlayerControlsGroup |
407 | - anchors.fill: parent |
408 | + anchors { |
409 | + bottom: parent.bottom |
410 | + left: parent.left |
411 | + right: parent.right |
412 | + top: playerControlsProgressBar.bottom |
413 | + } |
414 | color: "transparent" |
415 | - visible: trackQueue.model.count !== 0 |
416 | - |
417 | - /* Settings button */ |
418 | - // TODO: Enable settings when it is practical |
419 | - /* Rectangle { |
420 | - id: playerControlsSettings |
421 | - anchors.right: parent.right |
422 | - anchors.verticalCenter: parent.verticalCenter |
423 | - width: units.gu(6) |
424 | - height: width |
425 | - color: "transparent" |
426 | - |
427 | - Image { |
428 | - anchors.horizontalCenter: parent.horizontalCenter |
429 | - anchors.verticalCenter: parent.verticalCenter |
430 | - height: units.gu(3) |
431 | - source: Qt.resolvedUrl("images/settings.png") |
432 | - width: height |
433 | - } |
434 | - |
435 | - MouseArea { |
436 | - anchors.fill: parent |
437 | - onClicked: { |
438 | - console.debug('Debug: Show settings') |
439 | - PopupUtils.open(Qt.resolvedUrl("MusicSettings.qml"), mainView, |
440 | - { |
441 | - title: i18n.tr("Settings") |
442 | - } ) |
443 | - } |
444 | - } |
445 | - } */ |
446 | - |
447 | - /* Play/Pause button TODO: image and colours needs updating */ |
448 | - Rectangle { |
449 | - id: playerControlsPlayButton |
450 | - anchors.right: parent.right |
451 | - anchors.rightMargin: units.gu(1) |
452 | - anchors.verticalCenter: parent.verticalCenter |
453 | - antialiasing: true |
454 | - color: "#444" |
455 | - height: units.gu(7) |
456 | - objectName: "smallPlayShape" |
457 | - radius: height / 2 |
458 | - width: height |
459 | - |
460 | - function trigger() { |
461 | - if (emptyPage.noMusic) { |
462 | - return; |
463 | - } |
464 | - |
465 | - if (trackQueue.model.count === 0) { |
466 | - playRandomSong(); |
467 | - } |
468 | - else { |
469 | - player.toggle(); |
470 | - } |
471 | - } |
472 | - |
473 | - // draws the outer shadow/highlight |
474 | - Rectangle { |
475 | - id: sourceOutter |
476 | - anchors { fill: parent; margins: -units.gu(0.1) } |
477 | - radius: (width / 2) |
478 | - antialiasing: true |
479 | - gradient: Gradient { |
480 | - GradientStop { position: 0.0; color: "black" } |
481 | - GradientStop { position: 0.5; color: "transparent" } |
482 | - GradientStop { position: 1.0; color: UbuntuColors.warmGrey } |
483 | - } |
484 | - |
485 | - Rectangle { |
486 | - anchors.verticalCenter: parent.verticalCenter |
487 | - anchors.horizontalCenter: parent.horizontalCenter |
488 | - antialiasing: true |
489 | - color: "#444" |
490 | - height: playerControlsPlayButton.height - units.gu(.1) |
491 | - radius: height / 2 |
492 | - width: height |
493 | - |
494 | - Rectangle { |
495 | - id: playerControlsPlayInnerCircle |
496 | - anchors.horizontalCenter: parent.horizontalCenter |
497 | - anchors.verticalCenter: parent.verticalCenter |
498 | - antialiasing: true |
499 | - height: units.gu(4.5) |
500 | - radius: height / 2 |
501 | - width: height |
502 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
503 | - |
504 | - // draws the inner shadow/highlight |
505 | - Rectangle { |
506 | - id: sourceInner |
507 | - anchors { fill: parent; margins: -units.gu(0.1) } |
508 | - radius: (width / 2) |
509 | - antialiasing: true |
510 | - gradient: Gradient { |
511 | - GradientStop { position: 0.0; color: UbuntuColors.warmGrey } |
512 | - GradientStop { position: 0.5; color: "transparent" } |
513 | - GradientStop { position: 1.0; color: "black" } |
514 | - } |
515 | - |
516 | - Rectangle { |
517 | - anchors.verticalCenter: parent.verticalCenter |
518 | - anchors.horizontalCenter: parent.horizontalCenter |
519 | - antialiasing: true |
520 | - height: playerControlsPlayInnerCircle.height - units.gu(.1) |
521 | - radius: height / 2 |
522 | - width: height |
523 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
524 | - |
525 | - Image { |
526 | - id: playindicator |
527 | - height: units.gu(4) |
528 | - width: height |
529 | - anchors.horizontalCenter: parent.horizontalCenter |
530 | - anchors.verticalCenter: parent.verticalCenter |
531 | - opacity: emptyPage.noMusic ? .4 : 1 |
532 | - source: player.playbackState === MediaPlayer.PlayingState ? |
533 | - Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg") |
534 | - } |
535 | - } |
536 | - } |
537 | - } |
538 | + |
539 | + /* Album art in player controls */ |
540 | + Image { |
541 | + id: playerControlsImage |
542 | + anchors { |
543 | + bottom: parent.bottom |
544 | + left: parent.left |
545 | + top: parent.top |
546 | + } |
547 | + source: player.currentMetaArt |
548 | + width: parent.height |
549 | + |
550 | + onStatusChanged: { |
551 | + if (status === Image.Error) { |
552 | + source = Qt.resolvedUrl("../images/music-app-cover@30.png") |
553 | } |
554 | } |
555 | } |
556 | |
557 | - /* Container holding the labels for the toolbar */ |
558 | - Rectangle { |
559 | - id: playerControlLabelContainer |
560 | - anchors.bottom: parent.bottom |
561 | - anchors.left: parent.left |
562 | - anchors.right: playerControlsPlayButton.left |
563 | - anchors.top: parent.top |
564 | - color: "transparent" |
565 | + /* Column of meta labels */ |
566 | + Column { |
567 | + id: playerControlsLabels |
568 | + anchors { |
569 | + left: playerControlsImage.right |
570 | + leftMargin: units.gu(1.5) |
571 | + right: playerControlsPreviousButton.left |
572 | + rightMargin: units.gu(1) |
573 | + verticalCenter: parent.verticalCenter |
574 | + } |
575 | |
576 | /* Title of track */ |
577 | Label { |
578 | id: playerControlsTitle |
579 | - anchors.left: parent.left |
580 | - anchors.leftMargin: units.gu(1) |
581 | - anchors.right: parent.right |
582 | - anchors.rightMargin: units.gu(1) |
583 | - anchors.top: parent.top |
584 | - anchors.topMargin: units.gu(1) |
585 | - color: styleMusic.playerControls.labelColor |
586 | + anchors { |
587 | + left: parent.left |
588 | + right: parent.right |
589 | + } |
590 | + color: "#FFF" |
591 | elide: Text.ElideRight |
592 | - fontSize: "medium" |
593 | + fontSize: "small" |
594 | objectName: "playercontroltitle" |
595 | text: player.currentMetaTitle === "" |
596 | ? player.source : player.currentMetaTitle |
597 | @@ -1020,34 +835,100 @@ |
598 | /* Artist of track */ |
599 | Label { |
600 | id: playerControlsArtist |
601 | - anchors.left: parent.left |
602 | - anchors.leftMargin: units.gu(1) |
603 | - anchors.right: parent.right |
604 | - anchors.rightMargin: units.gu(1) |
605 | - anchors.top: playerControlsTitle.bottom |
606 | - color: styleMusic.playerControls.labelColor |
607 | + anchors { |
608 | + left: parent.left |
609 | + right: parent.right |
610 | + } |
611 | + color: "#FFF" |
612 | elide: Text.ElideRight |
613 | fontSize: "small" |
614 | + opacity: 0.4 |
615 | text: player.currentMetaArtist |
616 | } |
617 | - |
618 | - /* Album of track */ |
619 | - Label { |
620 | - id: playerControlsAlbum |
621 | - anchors.left: parent.left |
622 | - anchors.leftMargin: units.gu(1) |
623 | - anchors.right: parent.right |
624 | - anchors.rightMargin: units.gu(1) |
625 | - anchors.top: playerControlsArtist.bottom |
626 | - color: styleMusic.playerControls.labelColor |
627 | - elide: Text.ElideRight |
628 | - fontSize: "small" |
629 | - text: player.currentMetaAlbum |
630 | - } |
631 | - } |
632 | - |
633 | + } |
634 | + |
635 | + /* Previous Button */ |
636 | + Icon { |
637 | + id: playerControlsPreviousButton |
638 | + anchors { |
639 | + right: playerControlsPlayButton.left |
640 | + rightMargin: units.gu(3) |
641 | + verticalCenter: parent.verticalCenter |
642 | + } |
643 | + color: "#FFF" |
644 | + height: units.gu(2.5) |
645 | + name: "media-skip-backward" |
646 | + width: height |
647 | + } |
648 | + |
649 | + MouseArea { |
650 | + anchors { |
651 | + bottom: parent.bottom |
652 | + left: playerControlsLabels.right |
653 | + right: playerControlsPlayButton.left |
654 | + top: parent.top |
655 | + } |
656 | + onClicked: player.previousSong() |
657 | + } |
658 | + |
659 | + /* Play/Pause button */ |
660 | + Icon { |
661 | + id: playerControlsPlayButton |
662 | + anchors { |
663 | + right: playerControlsNextButton.left |
664 | + rightMargin: units.gu(3) |
665 | + verticalCenter: parent.verticalCenter |
666 | + } |
667 | + color: "#FFF" |
668 | + height: units.gu(2.5) |
669 | + name: player.playbackState === MediaPlayer.PlayingState ? |
670 | + "media-playback-pause" : "media-playback-start" |
671 | + objectName: "smallPlayShape" |
672 | + width: height |
673 | + } |
674 | + |
675 | + MouseArea { |
676 | + anchors { |
677 | + bottom: parent.bottom |
678 | + left: playerControlsPreviousButton.right |
679 | + right: playerControlsNextButton.left |
680 | + top: parent.top |
681 | + } |
682 | + onClicked: player.toggle() |
683 | + } |
684 | + |
685 | + /* Next button */ |
686 | + Icon { |
687 | + id: playerControlsNextButton |
688 | + anchors { |
689 | + right: parent.right |
690 | + rightMargin: units.gu(3) |
691 | + verticalCenter: parent.verticalCenter |
692 | + } |
693 | + color: "#FFF" |
694 | + height: units.gu(2.5) |
695 | + name: "media-skip-forward" |
696 | + width: height |
697 | + } |
698 | + |
699 | + MouseArea { |
700 | + anchors { |
701 | + bottom: parent.bottom |
702 | + left: playerControlsPlayButton.right |
703 | + right: parent.right |
704 | + top: parent.top |
705 | + } |
706 | + onClicked: player.nextSong() |
707 | + } |
708 | + |
709 | + /* Mouse area to jump to now playing */ |
710 | Rectangle { |
711 | - anchors.fill: playerControlLabelContainer |
712 | + anchors { |
713 | + bottom: parent.bottom |
714 | + left: parent.left |
715 | + right: playerControlsLabels.right |
716 | + top: parent.top |
717 | + } |
718 | color: "transparent" |
719 | function trigger() { |
720 | tabs.pushNowPlaying(); |
721 | @@ -1057,40 +938,6 @@ |
722 | } |
723 | } |
724 | |
725 | - /* Object which provides the progress bar when toolbar is minimized */ |
726 | - Rectangle { |
727 | - id: musicToolbarSmallProgressBackground |
728 | - anchors { |
729 | - bottom: parent.top |
730 | - left: parent.left |
731 | - right: parent.right |
732 | - } |
733 | - color: styleMusic.common.black |
734 | - height: musicToolbarPanel.minimizedHeight |
735 | - visible: (!musicToolbarPanel.animating && |
736 | - !musicToolbarPanel.opened) |
737 | - || musicToolbarPanel.currentMode == "expanded" |
738 | - |
739 | - Rectangle { |
740 | - id: musicToolbarSmallProgressHint |
741 | - anchors.left: parent.left |
742 | - anchors.top: parent.top |
743 | - color: styleMusic.nowPlaying.progressForegroundColor |
744 | - height: parent.height |
745 | - width: 0 |
746 | - |
747 | - Connections { |
748 | - target: player |
749 | - onPositionChanged: { |
750 | - musicToolbarSmallProgressHint.width = (player.position / player.duration) * musicToolbarSmallProgressBackground.width |
751 | - } |
752 | - onStopped: { |
753 | - musicToolbarSmallProgressHint.width = 0; |
754 | - } |
755 | - } |
756 | - } |
757 | - } |
758 | - |
759 | /* Mouse events for the progress bar |
760 | is after musicToolbarMouseArea so that it captures mouse events for dragging */ |
761 | MouseArea { |
762 | @@ -1123,19 +970,6 @@ |
763 | musicToolbarFullProgressBarContainer.seeking = false; |
764 | } |
765 | } |
766 | - |
767 | - // Timer for autohide |
768 | - Timer { |
769 | - id: toolbarAutoHideTimer |
770 | - interval: 5000 |
771 | - repeat: false |
772 | - running: false |
773 | - onTriggered: { |
774 | - if (currentPage !== nowPlaying) { // don't autohide on now playing |
775 | - hideToolbar(); |
776 | - } |
777 | - } |
778 | - } |
779 | } |
780 | } |
781 | |
782 | |
783 | === modified file 'MusicTracks.qml' |
784 | --- MusicTracks.qml 2014-09-20 15:41:33 +0000 |
785 | +++ MusicTracks.qml 2014-09-30 15:34:08 +0000 |
786 | @@ -36,8 +36,9 @@ |
787 | |
788 | ListView { |
789 | id: tracklist |
790 | - anchors.fill: parent |
791 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
792 | + anchors { |
793 | + fill: parent |
794 | + } |
795 | highlightFollowsCurrentItem: false |
796 | objectName: "trackstab-listview" |
797 | model: SortFilterModel { |
798 | |
799 | === modified file 'MusicaddtoPlaylist.qml' |
800 | --- MusicaddtoPlaylist.qml 2014-09-20 10:50:45 +0000 |
801 | +++ MusicaddtoPlaylist.qml 2014-09-30 15:34:08 +0000 |
802 | @@ -65,7 +65,6 @@ |
803 | ListView { |
804 | id: addtoPlaylistView |
805 | anchors { |
806 | - bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
807 | fill: parent |
808 | } |
809 | clip: true |
810 | |
811 | === modified file 'common/AlbumsPage.qml' |
812 | --- common/AlbumsPage.qml 2014-09-20 15:41:33 +0000 |
813 | +++ common/AlbumsPage.qml 2014-09-30 15:34:08 +0000 |
814 | @@ -28,7 +28,6 @@ |
815 | |
816 | MusicPage { |
817 | id: albumStackPage |
818 | - anchors.bottomMargin: units.gu(.5) |
819 | objectName: "albumsArtistPage" |
820 | visible: false |
821 | |
822 | @@ -38,7 +37,6 @@ |
823 | ListView { |
824 | id: albumtrackslist |
825 | anchors { |
826 | - bottomMargin: wideAspect ? musicToolbar.fullHeight : musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
827 | fill: parent |
828 | } |
829 | delegate: albumTracksDelegate |
830 | |
831 | === modified file 'common/MusicPage.qml' |
832 | --- common/MusicPage.qml 2014-08-20 17:35:52 +0000 |
833 | +++ common/MusicPage.qml 2014-09-30 15:34:08 +0000 |
834 | @@ -23,6 +23,10 @@ |
835 | // generic page for music, could be useful for bottomedge implementation |
836 | Page { |
837 | id: thisPage |
838 | + anchors { |
839 | + bottomMargin: musicToolbar.currentHeight |
840 | + fill: parent |
841 | + } |
842 | |
843 | onVisibleChanged: { |
844 | if (visible) { |
845 | |
846 | === modified file 'common/SongsPage.qml' |
847 | --- common/SongsPage.qml 2014-09-20 15:41:33 +0000 |
848 | +++ common/SongsPage.qml 2014-09-30 15:34:08 +0000 |
849 | @@ -29,7 +29,6 @@ |
850 | |
851 | MusicPage { |
852 | id: songStackPage |
853 | - anchors.bottomMargin: units.gu(.5) |
854 | objectName: "songsPage" |
855 | visible: false |
856 | |
857 | @@ -52,7 +51,6 @@ |
858 | ListView { |
859 | id: albumtrackslist |
860 | anchors { |
861 | - bottomMargin: wideAspect ? musicToolbar.fullHeight : musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
862 | fill: parent |
863 | } |
864 | delegate: albumTracksDelegate |
865 | |
866 | === modified file 'music-app.qml' |
867 | --- music-app.qml 2014-09-30 01:04:02 +0000 |
868 | +++ music-app.qml 2014-09-30 15:34:08 +0000 |
869 | @@ -46,11 +46,7 @@ |
870 | // Global keyboard shortcuts |
871 | focus: true |
872 | Keys.onPressed: { |
873 | - if (event.key === Qt.Key_Alt) { |
874 | - // On alt key press show toolbar and start autohide timer |
875 | - musicToolbar.showToolbar(); |
876 | - } |
877 | - else if(event.key === Qt.Key_Escape) { |
878 | + if(event.key === Qt.Key_Escape) { |
879 | musicToolbar.goBack(); // Esc Go back |
880 | } |
881 | else if(event.modifiers === Qt.AltModifier) { |
882 | @@ -95,11 +91,9 @@ |
883 | case Qt.Key_J: // Ctrl+J Jump to playing song |
884 | nowPlaying.visible = true; |
885 | nowPlaying.positionAt(player.currentIndex); |
886 | - musicToolbar.showToolbar(); |
887 | break; |
888 | case Qt.Key_N: // Ctrl+N Show now playing |
889 | nowPlaying.visible = true; |
890 | - musicToolbar.showToolbar(); |
891 | break; |
892 | case Qt.Key_P: // Ctrl+P Toggle playing state |
893 | player.toggle(); |
894 | @@ -576,12 +570,6 @@ |
895 | if (args.values.url) { |
896 | uriHandler.process(args.values.url, true); |
897 | } |
898 | - |
899 | - // Show toolbar and start timer if there is music |
900 | - if (!emptyPage.noMusic) { |
901 | - musicToolbar.showToolbar(); |
902 | - musicToolbar.startAutohideTimer(); |
903 | - } |
904 | } |
905 | |
906 | // VARIABLES |
907 | @@ -597,7 +585,6 @@ |
908 | property bool selectedAlbum: false |
909 | |
910 | signal listItemSwiping(int i) |
911 | - signal onToolbarShownChanged(bool shown, var currentPage, var currentTab) |
912 | |
913 | property bool wideAspect: width >= units.gu(70) && loadedUI |
914 | property bool loadedUI: false // property to detect if the UI has finished |
915 | @@ -679,8 +666,6 @@ |
916 | // Show the Now Playing page and make sure the track is visible |
917 | tabs.pushNowPlaying(); |
918 | nowPlaying.ensureVisibleIndex = index; |
919 | - |
920 | - musicToolbar.showToolbar(); |
921 | } |
922 | else { |
923 | player.source = file; |
924 | @@ -698,8 +683,6 @@ |
925 | // Show the Now Playing page and make sure the track is visible |
926 | tabs.pushNowPlaying(); |
927 | nowPlaying.ensureVisibleIndex = index; |
928 | - |
929 | - musicToolbar.showToolbar(); |
930 | } |
931 | |
932 | function playRandomSong(shuffle) |
933 | |
934 | === modified file 'po/com.ubuntu.music.pot' |
935 | --- po/com.ubuntu.music.pot 2014-09-23 12:44:36 +0000 |
936 | +++ po/com.ubuntu.music.pot 2014-09-30 15:34:08 +0000 |
937 | @@ -8,7 +8,7 @@ |
938 | msgstr "" |
939 | "Project-Id-Version: music-app\n" |
940 | "Report-Msgid-Bugs-To: \n" |
941 | -"POT-Creation-Date: 2014-09-23 13:43+0100\n" |
942 | +"POT-Creation-Date: 2014-09-30 15:08+0100\n" |
943 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
944 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
945 | "Language-Team: LANGUAGE <LL@li.org>\n" |
946 | @@ -114,15 +114,15 @@ |
947 | msgid "Change" |
948 | msgstr "" |
949 | |
950 | -#: ../MusicPlaylists.qml:96 ../music-app.qml:956 |
951 | +#: ../MusicPlaylists.qml:96 ../music-app.qml:951 |
952 | msgid "Playlist already exists" |
953 | msgstr "" |
954 | |
955 | -#: ../MusicPlaylists.qml:100 ../music-app.qml:961 |
956 | +#: ../MusicPlaylists.qml:100 ../music-app.qml:956 |
957 | msgid "Please type in a name." |
958 | msgstr "" |
959 | |
960 | -#: ../MusicPlaylists.qml:105 ../music-app.qml:493 ../music-app.qml:967 |
961 | +#: ../MusicPlaylists.qml:105 ../music-app.qml:492 ../music-app.qml:962 |
962 | msgid "Cancel" |
963 | msgstr "" |
964 | |
965 | @@ -133,12 +133,12 @@ |
966 | msgid "Playlist" |
967 | msgstr "" |
968 | |
969 | -#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:519 |
970 | -#: ../music-app.qml:93 ../music-app.qml:141 ../music-app.qml:147 |
971 | +#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:522 |
972 | +#: ../music-app.qml:92 ../music-app.qml:140 ../music-app.qml:146 |
973 | msgid "Search" |
974 | msgstr "" |
975 | |
976 | -#: ../MusicSettings.qml:30 ../music-app.qml:191 |
977 | +#: ../MusicSettings.qml:30 ../music-app.qml:190 |
978 | msgid "Settings" |
979 | msgstr "" |
980 | |
981 | @@ -224,7 +224,7 @@ |
982 | msgid "Clean everything!" |
983 | msgstr "" |
984 | |
985 | -#: ../MusicStart.qml:35 ../music-app.qml:589 ../music-app.qml:1150 |
986 | +#: ../MusicStart.qml:35 ../music-app.qml:588 ../music-app.qml:1145 |
987 | #: com.ubuntu.music_music.desktop.in.in.h:1 |
988 | msgid "Music" |
989 | msgstr "" |
990 | @@ -246,8 +246,8 @@ |
991 | msgid "Genre" |
992 | msgstr "" |
993 | |
994 | -#: ../MusicToolbar.qml:760 |
995 | -msgid "Tap play to shuffle music" |
996 | +#: ../MusicToolbar.qml:767 |
997 | +msgid "Tap to shuffle music" |
998 | msgstr "" |
999 | |
1000 | #: ../MusicTracks.qml:35 |
1001 | @@ -264,11 +264,11 @@ |
1002 | msgstr "" |
1003 | |
1004 | #: ../common/AlbumsPage.qml:211 ../common/AlbumsPage.qml:400 |
1005 | -#: ../common/SongsPage.qml:200 ../music-app.qml:888 |
1006 | +#: ../common/SongsPage.qml:200 ../music-app.qml:883 |
1007 | msgid "Add to queue" |
1008 | msgstr "" |
1009 | |
1010 | -#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:902 |
1011 | +#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:897 |
1012 | msgid "Add to playlist" |
1013 | msgstr "" |
1014 | |
1015 | @@ -306,127 +306,127 @@ |
1016 | msgid "Unknown Artist" |
1017 | msgstr "" |
1018 | |
1019 | -#: ../music-app.qml:142 |
1020 | +#: ../music-app.qml:141 |
1021 | msgid "Search Track" |
1022 | msgstr "" |
1023 | |
1024 | +#: ../music-app.qml:153 |
1025 | +msgid "Next" |
1026 | +msgstr "" |
1027 | + |
1028 | #: ../music-app.qml:154 |
1029 | -msgid "Next" |
1030 | -msgstr "" |
1031 | - |
1032 | -#: ../music-app.qml:155 |
1033 | msgid "Next Track" |
1034 | msgstr "" |
1035 | |
1036 | -#: ../music-app.qml:161 |
1037 | +#: ../music-app.qml:160 |
1038 | msgid "Pause" |
1039 | msgstr "" |
1040 | |
1041 | -#: ../music-app.qml:161 |
1042 | +#: ../music-app.qml:160 |
1043 | msgid "Play" |
1044 | msgstr "" |
1045 | |
1046 | -#: ../music-app.qml:163 |
1047 | +#: ../music-app.qml:162 |
1048 | msgid "Pause Playback" |
1049 | msgstr "" |
1050 | |
1051 | -#: ../music-app.qml:163 |
1052 | +#: ../music-app.qml:162 |
1053 | msgid "Continue or start playback" |
1054 | msgstr "" |
1055 | |
1056 | +#: ../music-app.qml:167 |
1057 | +msgid "Back" |
1058 | +msgstr "" |
1059 | + |
1060 | #: ../music-app.qml:168 |
1061 | -msgid "Back" |
1062 | -msgstr "" |
1063 | - |
1064 | -#: ../music-app.qml:169 |
1065 | msgid "Go back to last page" |
1066 | msgstr "" |
1067 | |
1068 | +#: ../music-app.qml:176 |
1069 | +msgid "Previous" |
1070 | +msgstr "" |
1071 | + |
1072 | #: ../music-app.qml:177 |
1073 | -msgid "Previous" |
1074 | -msgstr "" |
1075 | - |
1076 | -#: ../music-app.qml:178 |
1077 | msgid "Previous Track" |
1078 | msgstr "" |
1079 | |
1080 | +#: ../music-app.qml:182 |
1081 | +msgid "Stop" |
1082 | +msgstr "" |
1083 | + |
1084 | #: ../music-app.qml:183 |
1085 | -msgid "Stop" |
1086 | -msgstr "" |
1087 | - |
1088 | -#: ../music-app.qml:184 |
1089 | msgid "Stop Playback" |
1090 | msgstr "" |
1091 | |
1092 | -#: ../music-app.qml:192 |
1093 | +#: ../music-app.qml:191 |
1094 | msgid "Music Settings" |
1095 | msgstr "" |
1096 | |
1097 | #. TRANSLATORS: This string represents that the target destination filepath does not start with ~/Music/Imported/ |
1098 | -#: ../music-app.qml:338 |
1099 | +#: ../music-app.qml:337 |
1100 | msgid "Filepath must start with" |
1101 | msgstr "" |
1102 | |
1103 | #. TRANSLATORS: This string represents that a blank filepath destination has been used |
1104 | -#: ../music-app.qml:364 |
1105 | +#: ../music-app.qml:363 |
1106 | msgid "Filepath must be a file" |
1107 | msgstr "" |
1108 | |
1109 | #. TRANSLATORS: This string represents that there was failure moving the file to the target destination |
1110 | -#: ../music-app.qml:370 |
1111 | +#: ../music-app.qml:369 |
1112 | msgid "Failed to move file" |
1113 | msgstr "" |
1114 | |
1115 | -#: ../music-app.qml:447 |
1116 | +#: ../music-app.qml:446 |
1117 | msgid "Waiting for file(s)..." |
1118 | msgstr "" |
1119 | |
1120 | -#: ../music-app.qml:466 |
1121 | +#: ../music-app.qml:465 |
1122 | msgid "OK" |
1123 | msgstr "" |
1124 | |
1125 | -#: ../music-app.qml:479 |
1126 | +#: ../music-app.qml:478 |
1127 | msgid "Imported file not found" |
1128 | msgstr "" |
1129 | |
1130 | -#: ../music-app.qml:483 |
1131 | +#: ../music-app.qml:482 |
1132 | msgid "Wait" |
1133 | msgstr "" |
1134 | |
1135 | #. TRANSLATORS: this refers to a number of songs greater than one. The actual number will be prepended to the string automatically (plural forms are not yet fully supported in usermetrics, the library that displays that string) |
1136 | +#: ../music-app.qml:503 |
1137 | +msgid "songs played today" |
1138 | +msgstr "" |
1139 | + |
1140 | #: ../music-app.qml:504 |
1141 | -msgid "songs played today" |
1142 | -msgstr "" |
1143 | - |
1144 | -#: ../music-app.qml:505 |
1145 | msgid "No songs played today" |
1146 | msgstr "" |
1147 | |
1148 | -#: ../music-app.qml:613 |
1149 | +#: ../music-app.qml:612 |
1150 | msgid "Debug: " |
1151 | msgstr "" |
1152 | |
1153 | -#: ../music-app.qml:925 |
1154 | +#: ../music-app.qml:920 |
1155 | msgid "New Playlist" |
1156 | msgstr "" |
1157 | |
1158 | -#: ../music-app.qml:926 |
1159 | +#: ../music-app.qml:921 |
1160 | msgid "Name your playlist." |
1161 | msgstr "" |
1162 | |
1163 | -#: ../music-app.qml:930 |
1164 | +#: ../music-app.qml:925 |
1165 | msgid "Name" |
1166 | msgstr "" |
1167 | |
1168 | -#: ../music-app.qml:940 |
1169 | +#: ../music-app.qml:935 |
1170 | msgid "Create" |
1171 | msgstr "" |
1172 | |
1173 | -#: ../music-app.qml:1176 |
1174 | +#: ../music-app.qml:1171 |
1175 | msgid "No music found" |
1176 | msgstr "" |
1177 | |
1178 | -#: ../music-app.qml:1183 |
1179 | +#: ../music-app.qml:1178 |
1180 | msgid "Please import music" |
1181 | msgstr "" |
1182 |