Merge lp:~ahayzen/music-app/remix-remove-legacy-toolbar into lp:music-app/trusty
- remix-remove-legacy-toolbar
- Merge into trusty
Status: | Superseded |
---|---|
Proposed branch: | lp:~ahayzen/music-app/remix-remove-legacy-toolbar |
Merge into: | lp:music-app/trusty |
Diff against target: |
3358 lines (+926/-1391) (has conflicts) 19 files modified
MusicArtists.qml (+3/-2) MusicNowPlaying.qml (+316/-29) MusicPlaylists.qml (+3/-2) MusicSettings.qml (+0/-11) MusicToolbar.qml (+168/-934) MusicTracks.qml (+3/-2) MusicaddtoPlaylist.qml (+0/-1) Player.qml (+5/-1) Style.qml (+2/-2) com.ubuntu.music_music.desktop.in.in (+3/-0) common/AlbumsPage.qml (+0/-2) common/BlurredBackground.qml (+11/-9) common/MusicPage.qml (+4/-0) common/MusicRow.qml (+7/-4) common/SongsPage.qml (+142/-119) music-app.qml (+16/-27) po/com.ubuntu.music.pot (+69/-59) po/pt_BR.po (+172/-154) tests/autopilot/music_app/__init__.py (+2/-33) Text conflict in po/pt_BR.po |
To merge this branch: | bzr merge lp:~ahayzen/music-app/remix-remove-legacy-toolbar |
Related bugs: | |
Related blueprints: |
Music Remix for RTM
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Music App Developers | Pending | ||
Review via email: mp+237207@code.launchpad.net |
Commit message
* Remove legacy toolbar code
* Make full (non listview) now playing default
* Fix header disappearing in full now playing
Description of the change
* Remove legacy toolbar code
* Make full (non listview) now playing default
* Fix header disappearing in full now playing
- 653. By Andrew Hayzen
-
* Various fixes for autopilot
- 654. By Andrew Hayzen
-
* Fix for autopilot
- 655. By Andrew Hayzen
-
* Fix for missed case
- 656. By Andrew Hayzen
-
* Remove ensuring visible as this method is called sometimes when the now playing is not the currentPage
- 657. By Andrew Hayzen
-
* Further fixes for autopilot
- 658. By Andrew Hayzen
-
* Fix for pyflakes
- 659. By Andrew Hayzen
-
* Wait for now playing page to be visible when switching
- 660. By Andrew Hayzen
-
* Reget now playing page after switching
- 661. By Andrew Hayzen
-
* Fix for pagestack jumping
* Added extra code comment - 662. By Andrew Hayzen
-
* Merge of trunk
- 663. By Andrew Hayzen
-
* Add objectName for back button
- 664. By Andrew Hayzen
-
* Use custom back button
Unmerged revisions
- 664. By Andrew Hayzen
-
* Use custom back button
- 663. By Andrew Hayzen
-
* Add objectName for back button
- 662. By Andrew Hayzen
-
* Merge of trunk
- 661. By Andrew Hayzen
-
* Fix for pagestack jumping
* Added extra code comment - 660. By Andrew Hayzen
-
* Reget now playing page after switching
- 659. By Andrew Hayzen
-
* Wait for now playing page to be visible when switching
- 658. By Andrew Hayzen
-
* Fix for pyflakes
- 657. By Andrew Hayzen
-
* Further fixes for autopilot
- 656. By Andrew Hayzen
-
* Remove ensuring visible as this method is called sometimes when the now playing is not the currentPage
- 655. By Andrew Hayzen
-
* Fix for missed case
Preview Diff
1 | === modified file 'MusicArtists.qml' |
2 | --- MusicArtists.qml 2014-09-20 15:41:33 +0000 |
3 | +++ MusicArtists.qml 2014-10-06 02:21:13 +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-10-06 02:21:13 +0000 |
20 | @@ -17,7 +17,6 @@ |
21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 | */ |
23 | |
24 | - |
25 | import QtMultimedia 5.0 |
26 | import QtQuick 2.3 |
27 | import QtQuick.LocalStorage 2.0 |
28 | @@ -29,23 +28,30 @@ |
29 | |
30 | MusicPage { |
31 | id: nowPlaying |
32 | + flickable: isListView ? queuelist : null |
33 | objectName: "nowPlayingPage" |
34 | title: i18n.tr("Now Playing") |
35 | visible: false |
36 | + onVisibleChanged: { |
37 | + if (!visible) { |
38 | + // Reset the isListView property |
39 | + isListView = false |
40 | + } |
41 | + } |
42 | |
43 | property int ensureVisibleIndex: 0 // ensure first index is visible at startup |
44 | - |
45 | - Rectangle { |
46 | - anchors.fill: parent |
47 | - color: styleMusic.nowPlaying.backgroundColor |
48 | - opacity: 0.75 // change later |
49 | - MouseArea { // Block events to lower layers |
50 | - anchors.fill: parent |
51 | - } |
52 | - } |
53 | - |
54 | - Component.onCompleted: { |
55 | - onToolbarShownChanged.connect(jumpToCurrent) |
56 | + property bool isListView: false |
57 | + |
58 | + head { |
59 | + actions: [ |
60 | + Action { |
61 | + objectName: "toggleView" |
62 | + iconName: "media-playlist" |
63 | + onTriggered: { |
64 | + isListView = !isListView |
65 | + } |
66 | + } |
67 | + ] |
68 | } |
69 | |
70 | Connections { |
71 | @@ -59,9 +65,10 @@ |
72 | |
73 | customdebug("MusicQueue update currentIndex: " + player.source); |
74 | |
75 | - // Always jump to current track |
76 | - nowPlaying.jumpToCurrent(musicToolbar.opened, nowPlaying, musicToolbar.currentTab) |
77 | - |
78 | + // TODO: Never jump to track? Or only jump to track in queue view? |
79 | + if (isListView) { |
80 | + nowPlaying.jumpToCurrent(musicToolbar.opened, nowPlaying, musicToolbar.currentTab) |
81 | + } |
82 | } |
83 | } |
84 | |
85 | @@ -77,17 +84,303 @@ |
86 | |
87 | function positionAt(index) { |
88 | queuelist.positionViewAtIndex(index, ListView.Beginning); |
89 | - queuelist.contentY -= header.height; |
90 | + } |
91 | + |
92 | + Rectangle { |
93 | + id: fullview |
94 | + anchors.fill: parent |
95 | + color: "transparent" |
96 | + visible: !isListView |
97 | + |
98 | + BlurredBackground { |
99 | + id: blurredBackground |
100 | + anchors.top: parent.top |
101 | + anchors.topMargin: mainView.header.height |
102 | + height: units.gu(27) |
103 | + art: albumImage.source |
104 | + |
105 | + Image { |
106 | + id: albumImage |
107 | + anchors.centerIn: parent |
108 | + width: units.gu(18) |
109 | + height: width |
110 | + smooth: true |
111 | + source: player.currentMetaArt === "" ? |
112 | + decodeURIComponent("image://albumart/artist=" + |
113 | + player.currentMetaArtist + |
114 | + "&album=" + player.currentMetaAlbum) |
115 | + : player.currentMetaArt |
116 | + } |
117 | + } |
118 | + |
119 | + /* Full toolbar */ |
120 | + Item { |
121 | + id: musicToolbarFullContainer |
122 | + anchors.top: blurredBackground.bottom |
123 | + anchors.topMargin: units.gu(4) |
124 | + width: blurredBackground.width |
125 | + |
126 | + /* Column for labels in wideAspect */ |
127 | + Column { |
128 | + id: nowPlayingWideAspectLabels |
129 | + spacing: units.gu(1) |
130 | + anchors { |
131 | + left: parent.left |
132 | + leftMargin: units.gu(2) |
133 | + right: parent.right |
134 | + rightMargin: units.gu(2) |
135 | + } |
136 | + |
137 | + /* Title of track */ |
138 | + Label { |
139 | + id: nowPlayingWideAspectTitle |
140 | + anchors { |
141 | + left: parent.left |
142 | + leftMargin: units.gu(1) |
143 | + right: parent.right |
144 | + rightMargin: units.gu(1) |
145 | + } |
146 | + color: styleMusic.playerControls.labelColor |
147 | + elide: Text.ElideRight |
148 | + fontSize: "x-large" |
149 | + objectName: "playercontroltitle" |
150 | + text: trackQueue.model.count === 0 ? "" : player.currentMetaTitle === "" ? player.currentMetaFile : player.currentMetaTitle |
151 | + } |
152 | + |
153 | + /* Artist of track */ |
154 | + Label { |
155 | + id: nowPlayingWideAspectArtist |
156 | + anchors { |
157 | + left: parent.left |
158 | + leftMargin: units.gu(1) |
159 | + right: parent.right |
160 | + rightMargin: units.gu(1) |
161 | + } |
162 | + color: styleMusic.nowPlaying.labelSecondaryColor |
163 | + elide: Text.ElideRight |
164 | + fontSize: "small" |
165 | + text: trackQueue.model.count === 0 ? "" : player.currentMetaArtist |
166 | + } |
167 | + } |
168 | + |
169 | + /* Progress bar component */ |
170 | + MouseArea { |
171 | + id: musicToolbarFullProgressContainer |
172 | + anchors.left: parent.left |
173 | + anchors.leftMargin: units.gu(3) |
174 | + anchors.right: parent.right |
175 | + anchors.rightMargin: units.gu(3) |
176 | + anchors.top: nowPlayingWideAspectLabels.bottom |
177 | + anchors.topMargin: units.gu(3) |
178 | + height: units.gu(3) |
179 | + width: parent.width |
180 | + |
181 | + /* Position label */ |
182 | + Label { |
183 | + id: musicToolbarFullPositionLabel |
184 | + anchors.top: progressSliderMusic.bottom |
185 | + anchors.topMargin: units.gu(-2) |
186 | + anchors.left: parent.left |
187 | + color: styleMusic.nowPlaying.labelSecondaryColor |
188 | + fontSize: "small" |
189 | + height: parent.height |
190 | + horizontalAlignment: Text.AlignHCenter |
191 | + text: durationToString(player.position) |
192 | + verticalAlignment: Text.AlignVCenter |
193 | + width: units.gu(3) |
194 | + } |
195 | + |
196 | + Slider { |
197 | + id: progressSliderMusic |
198 | + anchors.left: parent.left |
199 | + anchors.right: parent.right |
200 | + objectName: "progressSliderShape" |
201 | + function formatValue(v) { return durationToString(v) } |
202 | + |
203 | + property bool seeking: false |
204 | + |
205 | + onSeekingChanged: { |
206 | + if (seeking === false) { |
207 | + musicToolbarFullPositionLabel.text = durationToString(player.position) |
208 | + } |
209 | + } |
210 | + |
211 | + onPressedChanged: { |
212 | + seeking = pressed |
213 | + if (!pressed) { |
214 | + player.seek(value) |
215 | + } |
216 | + } |
217 | + |
218 | + Connections { |
219 | + target: player |
220 | + onDurationChanged: { |
221 | + musicToolbarFullDurationLabel.text = durationToString(player.duration) |
222 | + progressSliderMusic.maximumValue = player.duration |
223 | + } |
224 | + onPositionChanged: { |
225 | + if (progressSliderMusic.seeking === false) { |
226 | + progressSliderMusic.value = player.position |
227 | + musicToolbarFullPositionLabel.text = durationToString(player.position) |
228 | + musicToolbarFullDurationLabel.text = durationToString(player.duration) |
229 | + } |
230 | + } |
231 | + onStopped: { |
232 | + musicToolbarFullPositionLabel.text = durationToString(0); |
233 | + musicToolbarFullDurationLabel.text = durationToString(0); |
234 | + } |
235 | + } |
236 | + } |
237 | + |
238 | + /* Duration label */ |
239 | + Label { |
240 | + id: musicToolbarFullDurationLabel |
241 | + anchors.top: progressSliderMusic.bottom |
242 | + anchors.topMargin: units.gu(-2) |
243 | + anchors.right: parent.right |
244 | + color: styleMusic.nowPlaying.labelSecondaryColor |
245 | + fontSize: "small" |
246 | + height: parent.height |
247 | + horizontalAlignment: Text.AlignHCenter |
248 | + text: durationToString(player.duration) |
249 | + verticalAlignment: Text.AlignVCenter |
250 | + width: units.gu(3) |
251 | + } |
252 | + } |
253 | + |
254 | + /* Repeat button */ |
255 | + MouseArea { |
256 | + id: nowPlayingRepeatButton |
257 | + objectName: "repeatShape" |
258 | + anchors.right: nowPlayingPreviousButton.left |
259 | + anchors.rightMargin: units.gu(1) |
260 | + anchors.verticalCenter: nowPlayingPlayButton.verticalCenter |
261 | + height: units.gu(6) |
262 | + opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 |
263 | + width: height |
264 | + onClicked: player.repeat = !player.repeat |
265 | + |
266 | + Icon { |
267 | + id: repeatIcon |
268 | + height: units.gu(3) |
269 | + width: height |
270 | + anchors.verticalCenter: parent.verticalCenter |
271 | + anchors.horizontalCenter: parent.horizontalCenter |
272 | + color: "white" |
273 | + name: "media-playlist-repeat" |
274 | + opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 |
275 | + } |
276 | + } |
277 | + |
278 | + /* Previous button */ |
279 | + MouseArea { |
280 | + id: nowPlayingPreviousButton |
281 | + anchors.right: nowPlayingPlayButton.left |
282 | + anchors.rightMargin: units.gu(1) |
283 | + anchors.verticalCenter: nowPlayingPlayButton.verticalCenter |
284 | + height: units.gu(6) |
285 | + objectName: "previousShape" |
286 | + opacity: trackQueue.model.count === 0 ? .4 : 1 |
287 | + width: height |
288 | + onClicked: player.previousSong() |
289 | + |
290 | + Icon { |
291 | + id: nowPlayingPreviousIndicator |
292 | + height: units.gu(3) |
293 | + width: height |
294 | + anchors.verticalCenter: parent.verticalCenter |
295 | + anchors.horizontalCenter: parent.horizontalCenter |
296 | + color: "white" |
297 | + name: "media-skip-backward" |
298 | + opacity: 1 |
299 | + } |
300 | + } |
301 | + |
302 | + /* Play/Pause button */ |
303 | + MouseArea { |
304 | + id: nowPlayingPlayButton |
305 | + anchors.horizontalCenter: parent.horizontalCenter |
306 | + anchors.top: musicToolbarFullProgressContainer.bottom |
307 | + anchors.topMargin: units.gu(2) |
308 | + height: units.gu(12) |
309 | + objectName: "playShape" |
310 | + width: height |
311 | + onClicked: player.toggle() |
312 | + |
313 | + Icon { |
314 | + id: nowPlayingPlayIndicator |
315 | + height: units.gu(6) |
316 | + width: height |
317 | + anchors.verticalCenter: parent.verticalCenter |
318 | + anchors.horizontalCenter: parent.horizontalCenter |
319 | + opacity: emptyPage.noMusic ? .4 : 1 |
320 | + color: "white" |
321 | + name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start" |
322 | + } |
323 | + } |
324 | + |
325 | + /* Next button */ |
326 | + MouseArea { |
327 | + id: nowPlayingNextButton |
328 | + anchors.left: nowPlayingPlayButton.right |
329 | + anchors.leftMargin: units.gu(1) |
330 | + anchors.verticalCenter: nowPlayingPlayButton.verticalCenter |
331 | + height: units.gu(6) |
332 | + objectName: "forwardShape" |
333 | + opacity: trackQueue.model.count === 0 ? .4 : 1 |
334 | + width: height |
335 | + onClicked: player.nextSong() |
336 | + |
337 | + Icon { |
338 | + id: nowPlayingNextIndicator |
339 | + height: units.gu(3) |
340 | + width: height |
341 | + anchors.verticalCenter: parent.verticalCenter |
342 | + anchors.horizontalCenter: parent.horizontalCenter |
343 | + color: "white" |
344 | + name: "media-skip-forward" |
345 | + opacity: 1 |
346 | + } |
347 | + } |
348 | + |
349 | + /* Shuffle button */ |
350 | + MouseArea { |
351 | + id: nowPlayingShuffleButton |
352 | + objectName: "shuffleShape" |
353 | + anchors.left: nowPlayingNextButton.right |
354 | + anchors.leftMargin: units.gu(1) |
355 | + anchors.verticalCenter: nowPlayingPlayButton.verticalCenter |
356 | + height: units.gu(6) |
357 | + opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 |
358 | + width: height |
359 | + onClicked: player.shuffle = !player.shuffle |
360 | + |
361 | + Icon { |
362 | + id: shuffleIcon |
363 | + height: units.gu(3) |
364 | + width: height |
365 | + anchors.verticalCenter: parent.verticalCenter |
366 | + anchors.horizontalCenter: parent.horizontalCenter |
367 | + color: "white" |
368 | + name: "media-playlist-shuffle" |
369 | + opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 |
370 | + } |
371 | + } |
372 | + } |
373 | } |
374 | |
375 | ListView { |
376 | id: queuelist |
377 | - objectName: "nowPlayingQueueList" |
378 | - anchors.fill: parent |
379 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
380 | + anchors { |
381 | + fill: parent |
382 | + } |
383 | delegate: queueDelegate |
384 | + footer: Item { |
385 | + height: mainView.height - (styleMusic.common.expandHeight + queuelist.currentHeight) + units.gu(8) |
386 | + } |
387 | + highlightFollowsCurrentItem: false |
388 | model: trackQueue.model |
389 | - highlightFollowsCurrentItem: false |
390 | + objectName: "nowPlayingQueueList" |
391 | state: "normal" |
392 | states: [ |
393 | State { |
394 | @@ -105,9 +398,7 @@ |
395 | } |
396 | } |
397 | ] |
398 | - footer: Item { |
399 | - height: mainView.height - (styleMusic.common.expandHeight + queuelist.currentHeight) + units.gu(8) |
400 | - } |
401 | + visible: isListView |
402 | |
403 | property int normalHeight: units.gu(12) |
404 | property int currentHeight: units.gu(40) |
405 | @@ -117,10 +408,6 @@ |
406 | customdebug("Queue: Now has: " + queuelist.count + " tracks") |
407 | } |
408 | |
409 | - onMovementStarted: { |
410 | - musicToolbar.hideToolbar(); |
411 | - } |
412 | - |
413 | Component { |
414 | id: queueDelegate |
415 | ListItemWithActions { |
416 | @@ -218,7 +505,7 @@ |
417 | ? queuelist.currentHeight |
418 | : mainView.width - (trackImage.anchors.leftMargin * 2)) |
419 | : queuelist.normalHeight) - units.gu(2) |
420 | - covers: [{art: model.art}] |
421 | + covers: [{art: model.art, album: model.album, author: model.author}] |
422 | |
423 | spacing: units.gu(2) |
424 | |
425 | |
426 | === modified file 'MusicPlaylists.qml' |
427 | --- MusicPlaylists.qml 2014-09-20 10:50:45 +0000 |
428 | +++ MusicPlaylists.qml 2014-10-06 02:21:13 +0000 |
429 | @@ -116,8 +116,9 @@ |
430 | ListView { |
431 | id: playlistslist |
432 | objectName: "playlistsListView" |
433 | - anchors.fill: parent |
434 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
435 | + anchors { |
436 | + fill: parent |
437 | + } |
438 | model: playlistModel.model |
439 | delegate: playlistDelegate |
440 | onCountChanged: { |
441 | |
442 | === modified file 'MusicSettings.qml' |
443 | --- MusicSettings.qml 2014-09-20 10:50:45 +0000 |
444 | +++ MusicSettings.qml 2014-10-06 02:21:13 +0000 |
445 | @@ -30,17 +30,6 @@ |
446 | title: i18n.tr("Settings") |
447 | contentsHeight: parent.height; |
448 | |
449 | - onVisibleChanged: { |
450 | - if (visible === true) |
451 | - { |
452 | - musicToolbar.disableToolbar() |
453 | - } |
454 | - else |
455 | - { |
456 | - musicToolbar.enableToolbar() |
457 | - } |
458 | - } |
459 | - |
460 | onCancelClicked: PopupUtils.close(musicSettings) |
461 | onConfirmClicked: { |
462 | PopupUtils.close(musicSettings) |
463 | |
464 | === modified file 'MusicToolbar.qml' |
465 | --- MusicToolbar.qml 2014-09-23 20:45:41 +0000 |
466 | +++ MusicToolbar.qml 2014-10-06 02:21:13 +0000 |
467 | @@ -38,22 +38,9 @@ |
468 | property var previousPage: null |
469 | |
470 | // Properties and signals for the toolbar |
471 | - property var cachedStates: [] |
472 | - property bool shown: false |
473 | - property int transitionDuration: 100 |
474 | - |
475 | property alias currentHeight: musicToolbarPanel.height |
476 | - property alias minimizedHeight: musicToolbarPanel.minimizedHeight |
477 | - property alias expandedHeight: musicToolbarPanel.expandedHeight |
478 | - property alias fullHeight: musicToolbarPanel.fullHeight |
479 | - property alias mouseAreaOffset: musicToolbarPanel.hintSize |
480 | - |
481 | - property alias animating: musicToolbarPanel.animating |
482 | property alias opened: musicToolbarPanel.opened |
483 | |
484 | - // Alias for autopilot |
485 | - property alias currentMode: musicToolbarPanel.currentMode |
486 | - |
487 | Connections { |
488 | id: pageStackConn |
489 | target: mainPageStack |
490 | @@ -72,22 +59,6 @@ |
491 | |
492 | /* Helper functions */ |
493 | |
494 | - // Disable the toolbar for this page/view (eg a dialog) |
495 | - function disableToolbar() |
496 | - { |
497 | - cachedStates.push(state); |
498 | - musicToolbarPanel.state = "hidden"; |
499 | - } |
500 | - |
501 | - // Enable the toolbar (run when closing a page that disabled it) |
502 | - function enableToolbar() |
503 | - { |
504 | - if (cachedStates.length > 0) |
505 | - { |
506 | - musicToolbarPanel.state = cachedStates.pop(); |
507 | - } |
508 | - } |
509 | - |
510 | // Back button has been pressed, jump up pageStack or back to parent page |
511 | function goBack() |
512 | { |
513 | @@ -98,18 +69,6 @@ |
514 | else if (mainPageStack !== null && mainPageStack.depth > 1) { |
515 | mainPageStack.pop(currentPage) |
516 | } |
517 | - |
518 | - startAutohideTimer() |
519 | - } |
520 | - |
521 | - // Hide the toolbar |
522 | - function hideToolbar() |
523 | - { |
524 | - if (!wideAspect) { |
525 | - musicToolbarPanel.close(); |
526 | - } |
527 | - |
528 | - toolbarAutoHideTimer.stop(); // cancel any autohide |
529 | } |
530 | |
531 | // Remove sheet as it has been closed |
532 | @@ -126,8 +85,6 @@ |
533 | function setPage(childPage) |
534 | { |
535 | currentPage = childPage; |
536 | - // note: If pageStack tracking is needed readd here |
537 | - //currentPageStack = pageStack === undefined ? null : pageStack; |
538 | } |
539 | |
540 | // Set the current sheet (overrides page) |
541 | @@ -135,32 +92,6 @@ |
542 | currentSheet.push(sheet) |
543 | } |
544 | |
545 | - // Show the toolbar |
546 | - function showToolbar() |
547 | - { |
548 | - startAutohideTimer(); // always attempt to autohide toolbar |
549 | - |
550 | - if (!musicToolbarPanel.opened) { |
551 | - musicToolbarPanel.open(); |
552 | - } |
553 | - } |
554 | - |
555 | - // Start the autohidetimer |
556 | - function startAutohideTimer() |
557 | - { |
558 | - toolbarAutoHideTimer.restart(); |
559 | - } |
560 | - |
561 | - Connections { |
562 | - target: mainView |
563 | - onWideAspectChanged: { |
564 | - // Force toolbar to show if in wideAspect |
565 | - if (wideAspect && !opened) { |
566 | - showToolbar(); |
567 | - } |
568 | - } |
569 | - } |
570 | - |
571 | Panel { |
572 | id: musicToolbarPanel |
573 | anchors { |
574 | @@ -168,543 +99,9 @@ |
575 | right: parent.right |
576 | bottom: parent.bottom |
577 | } |
578 | - height: currentMode === "full" ? fullHeight : expandedHeight |
579 | - locked: wideAspect |
580 | - |
581 | - __closeOnContentsClicks: false // TODO: fix bug 1295720 |
582 | - |
583 | - // The current mode of the controls |
584 | - property string currentMode: wideAspect || (currentPage === nowPlaying) |
585 | - ? "full" : "expanded" |
586 | - |
587 | - // Properties for the different heights |
588 | - property int minimizedHeight: units.gu(0.5) |
589 | - property int expandedHeight: units.gu(8) |
590 | - property int fullHeight: units.gu(11) |
591 | - |
592 | - onCurrentModeChanged: { |
593 | - musicToolbarFullProgressMouseArea.enabled = currentMode === "full" |
594 | - } |
595 | - |
596 | - onOpenedChanged: { |
597 | - onToolbarShownChanged(opened, currentPage, currentTab); |
598 | - |
599 | - if (opened) { |
600 | - startAutohideTimer(); |
601 | - } |
602 | - } |
603 | - |
604 | - /* Full toolbar */ |
605 | - Rectangle { |
606 | - id: musicToolbarFullContainer |
607 | - anchors { |
608 | - fill: parent |
609 | - } |
610 | - color: styleMusic.toolbar.fullBackgroundColor |
611 | - visible: musicToolbarPanel.currentMode === "full" |
612 | - |
613 | - /* Buttons component */ |
614 | - Rectangle { |
615 | - id: musicToolbarFullButtonsContainer |
616 | - anchors.left: parent.left |
617 | - anchors.top: musicToolbarFullProgressContainer.bottom |
618 | - color: "transparent" |
619 | - height: parent.height - musicToolbarFullProgressContainer.height |
620 | - width: parent.width |
621 | - |
622 | - /* Column for labels in wideAspect */ |
623 | - Column { |
624 | - id: nowPlayingWideAspectLabels |
625 | - anchors { |
626 | - left: parent.left |
627 | - leftMargin: units.gu(1) |
628 | - right: nowPlayingRepeatButton.left |
629 | - rightMargin: units.gu(1) |
630 | - verticalCenter: parent.verticalCenter |
631 | - } |
632 | - visible: wideAspect |
633 | - |
634 | - /* Clicking in the area shows the queue */ |
635 | - function trigger() { |
636 | - if (trackQueue.model.count !== 0 && currentPage !== nowPlaying) { |
637 | - tabs.pushNowPlaying(); |
638 | - } |
639 | - else if (currentPage === nowPlaying) { |
640 | - musicToolbar.goBack(); |
641 | - } |
642 | - } |
643 | - |
644 | - /* Title of track */ |
645 | - Label { |
646 | - id: nowPlayingWideAspectTitle |
647 | - anchors { |
648 | - left: parent.left |
649 | - leftMargin: units.gu(1) |
650 | - right: parent.right |
651 | - rightMargin: units.gu(1) |
652 | - } |
653 | - color: styleMusic.playerControls.labelColor |
654 | - elide: Text.ElideRight |
655 | - fontSize: "medium" |
656 | - objectName: "playercontroltitle" |
657 | - text: trackQueue.model.count === 0 ? "" : player.currentMetaTitle === "" ? player.currentMetaFile : player.currentMetaTitle |
658 | - } |
659 | - |
660 | - /* Artist of track */ |
661 | - Label { |
662 | - id: nowPlayingWideAspectArtist |
663 | - anchors { |
664 | - left: parent.left |
665 | - leftMargin: units.gu(1) |
666 | - right: parent.right |
667 | - rightMargin: units.gu(1) |
668 | - } |
669 | - color: styleMusic.playerControls.labelColor |
670 | - elide: Text.ElideRight |
671 | - fontSize: "small" |
672 | - text: trackQueue.model.count === 0 ? "" : player.currentMetaArtist |
673 | - } |
674 | - |
675 | - /* Album of track */ |
676 | - Label { |
677 | - id: nowPlayingWideAspectAlbum |
678 | - anchors { |
679 | - left: parent.left |
680 | - leftMargin: units.gu(1) |
681 | - right: parent.right |
682 | - rightMargin: units.gu(1) |
683 | - } |
684 | - color: styleMusic.playerControls.labelColor |
685 | - elide: Text.ElideRight |
686 | - fontSize: "small" |
687 | - text: trackQueue.model.count === 0 ? "" : player.currentMetaAlbum |
688 | - } |
689 | - } |
690 | - |
691 | - /* Repeat button */ |
692 | - Item { |
693 | - id: nowPlayingRepeatButton |
694 | - objectName: "repeatShape" |
695 | - anchors.right: nowPlayingPreviousButton.left |
696 | - anchors.rightMargin: units.gu(1) |
697 | - anchors.verticalCenter: parent.verticalCenter |
698 | - height: units.gu(6) |
699 | - opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 |
700 | - width: height |
701 | - |
702 | - function trigger() { |
703 | - if (emptyPage.noMusic) { |
704 | - return; |
705 | - } |
706 | - |
707 | - // Invert repeat settings |
708 | - player.repeat = !player.repeat |
709 | - } |
710 | - |
711 | - Image { |
712 | - id: repeatIcon |
713 | - height: units.gu(3) |
714 | - width: height |
715 | - anchors.verticalCenter: parent.verticalCenter |
716 | - anchors.horizontalCenter: parent.horizontalCenter |
717 | - source: Qt.resolvedUrl("images/media-playlist-repeat.svg") |
718 | - verticalAlignment: Text.AlignVCenter |
719 | - opacity: player.repeat && !emptyPage.noMusic ? 1 : .4 |
720 | - } |
721 | - } |
722 | - |
723 | - /* Previous button */ |
724 | - Item { |
725 | - id: nowPlayingPreviousButton |
726 | - anchors.right: nowPlayingPlayButton.left |
727 | - anchors.rightMargin: units.gu(1) |
728 | - anchors.verticalCenter: parent.verticalCenter |
729 | - height: units.gu(6) |
730 | - objectName: "previousShape" |
731 | - opacity: trackQueue.model.count === 0 ? .4 : 1 |
732 | - width: height |
733 | - |
734 | - function trigger() { |
735 | - if (trackQueue.model.count === 0) { |
736 | - return; |
737 | - } |
738 | - |
739 | - player.previousSong() |
740 | - } |
741 | - |
742 | - Image { |
743 | - id: nowPlayingPreviousIndicator |
744 | - height: units.gu(3) |
745 | - width: height |
746 | - anchors.horizontalCenter: parent.horizontalCenter |
747 | - anchors.verticalCenter: parent.verticalCenter |
748 | - source: Qt.resolvedUrl("images/media-skip-backward.svg") |
749 | - opacity: 1 |
750 | - } |
751 | - } |
752 | - |
753 | - /* Play/Pause button */ |
754 | - Rectangle { |
755 | - id: nowPlayingPlayButton |
756 | - anchors.horizontalCenter: parent.horizontalCenter |
757 | - anchors.verticalCenter: parent.verticalCenter |
758 | - antialiasing: true |
759 | - color: styleMusic.toolbar.fullOuterPlayCircleColor |
760 | - height: units.gu(12) |
761 | - radius: height / 2 |
762 | - width: height |
763 | - |
764 | - // draws the outter shadow/highlight |
765 | - Rectangle { |
766 | - id: sourceOutterFull |
767 | - anchors { fill: parent; margins: -units.gu(0.1) } |
768 | - radius: (width / 2) |
769 | - antialiasing: true |
770 | - gradient: Gradient { |
771 | - GradientStop { position: 0.0; color: "black" } |
772 | - GradientStop { position: 0.5; color: "transparent" } |
773 | - GradientStop { position: 1.0; color: UbuntuColors.warmGrey } |
774 | - } |
775 | - |
776 | - Rectangle { |
777 | - anchors.horizontalCenter: parent.horizontalCenter |
778 | - anchors.verticalCenter: parent.verticalCenter |
779 | - antialiasing: true |
780 | - color: styleMusic.toolbar.fullOuterPlayCircleColor |
781 | - height: nowPlayingPlayButton.height - units.gu(.1) |
782 | - radius: height / 2 |
783 | - width: height |
784 | - |
785 | - Rectangle { |
786 | - id: nowPlayingPlayButtonInner |
787 | - anchors.horizontalCenter: parent.horizontalCenter |
788 | - anchors.verticalCenter: parent.verticalCenter |
789 | - antialiasing: true |
790 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
791 | - height: units.gu(7) |
792 | - radius: height / 2 |
793 | - width: height |
794 | - |
795 | - // draws the inner shadow/highlight |
796 | - Rectangle { |
797 | - id: sourceInnerFull |
798 | - anchors { fill: parent; margins: -units.gu(0.1) } |
799 | - radius: (width / 2) |
800 | - antialiasing: true |
801 | - gradient: Gradient { |
802 | - GradientStop { position: 0.0; color: UbuntuColors.warmGrey } |
803 | - GradientStop { position: 0.5; color: "transparent" } |
804 | - GradientStop { position: 1.0; color: "black" } |
805 | - } |
806 | - |
807 | - Rectangle { |
808 | - anchors.horizontalCenter: parent.horizontalCenter |
809 | - anchors.verticalCenter: parent.verticalCenter |
810 | - antialiasing: true |
811 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
812 | - height: nowPlayingPlayButtonInner.height - units.gu(.1) |
813 | - objectName: "playShape" |
814 | - radius: height / 2 |
815 | - width: height |
816 | - |
817 | - function trigger() { |
818 | - if (emptyPage.noMusic) { |
819 | - return; |
820 | - } |
821 | - |
822 | - if (trackQueue.model.count === 0) { |
823 | - playRandomSong(); |
824 | - } |
825 | - else { |
826 | - player.toggle(); |
827 | - } |
828 | - } |
829 | - |
830 | - Image { |
831 | - id: nowPlayingPlayIndicator |
832 | - height: units.gu(6) |
833 | - width: height |
834 | - anchors.horizontalCenter: parent.horizontalCenter |
835 | - anchors.verticalCenter: parent.verticalCenter |
836 | - opacity: emptyPage.noMusic ? .4 : 1 |
837 | - source: player.playbackState === MediaPlayer.PlayingState ? |
838 | - Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg") |
839 | - } |
840 | - } |
841 | - } |
842 | - } |
843 | - } |
844 | - } |
845 | - } |
846 | - |
847 | - /* Next button */ |
848 | - Item { |
849 | - id: nowPlayingNextButton |
850 | - anchors.left: nowPlayingPlayButton.right |
851 | - anchors.leftMargin: units.gu(1) |
852 | - anchors.verticalCenter: parent.verticalCenter |
853 | - height: units.gu(6) |
854 | - objectName: "forwardShape" |
855 | - opacity: trackQueue.model.count === 0 ? .4 : 1 |
856 | - width: height |
857 | - |
858 | - function trigger() { |
859 | - if (trackQueue.model.count === 0 || emptyPage.noMusic) { |
860 | - return; |
861 | - } |
862 | - |
863 | - player.nextSong() |
864 | - } |
865 | - |
866 | - Image { |
867 | - id: nowPlayingNextIndicator |
868 | - height: units.gu(3) |
869 | - width: height |
870 | - anchors.horizontalCenter: parent.horizontalCenter |
871 | - anchors.verticalCenter: parent.verticalCenter |
872 | - source: Qt.resolvedUrl("images/media-skip-forward.svg") |
873 | - opacity: 1 |
874 | - } |
875 | - } |
876 | - |
877 | - /* Shuffle button */ |
878 | - Item { |
879 | - id: nowPlayingShuffleButton |
880 | - objectName: "shuffleShape" |
881 | - anchors.left: nowPlayingNextButton.right |
882 | - anchors.leftMargin: units.gu(1) |
883 | - anchors.verticalCenter: parent.verticalCenter |
884 | - height: units.gu(6) |
885 | - opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 |
886 | - width: height |
887 | - |
888 | - function trigger() { |
889 | - if (emptyPage.noMusic) { |
890 | - return; |
891 | - } |
892 | - |
893 | - // Invert shuffle settings |
894 | - player.shuffle = !player.shuffle |
895 | - } |
896 | - |
897 | - Image { |
898 | - id: shuffleIcon |
899 | - height: units.gu(3) |
900 | - width: height |
901 | - anchors.verticalCenter: parent.verticalCenter |
902 | - anchors.horizontalCenter: parent.horizontalCenter |
903 | - source: Qt.resolvedUrl("images/media-playlist-shuffle.svg") |
904 | - opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4 |
905 | - } |
906 | - } |
907 | - |
908 | - /* Search button in wideAspect */ |
909 | - Item { |
910 | - id: nowPlayingSearchButton |
911 | - objectName: "searchShape" |
912 | - anchors { |
913 | - right: parent.right |
914 | - rightMargin: units.gu(1) |
915 | - verticalCenter: parent.verticalCenter |
916 | - } |
917 | - height: units.gu(6) |
918 | - opacity: !emptyPage.noMusic ? 1 : .4 |
919 | - width: height |
920 | - visible: wideAspect |
921 | - |
922 | - function trigger() { |
923 | - if (emptyPage.noMusic) { |
924 | - return; |
925 | - } |
926 | - |
927 | - if (!searchSheet.sheetVisible) { |
928 | - PopupUtils.open(searchSheet.sheet, |
929 | - mainView, { title: i18n.tr("Search")} ) |
930 | - } |
931 | - } |
932 | - |
933 | - Image { |
934 | - id: searchIcon |
935 | - anchors { |
936 | - horizontalCenter: parent.horizontalCenter |
937 | - verticalCenter: parent.verticalCenter |
938 | - } |
939 | - height: units.gu(3) |
940 | - opacity: !emptyPage.noMusic ? 1 : .4 |
941 | - source: Qt.resolvedUrl("images/search.svg") |
942 | - width: height |
943 | - } |
944 | - } |
945 | - } |
946 | - |
947 | - /* Progress bar component */ |
948 | - Rectangle { |
949 | - id: musicToolbarFullProgressContainer |
950 | - anchors.left: parent.left |
951 | - anchors.top: parent.top |
952 | - color: styleMusic.toolbar.fullBackgroundColor |
953 | - height: units.gu(3) |
954 | - width: parent.width |
955 | - |
956 | - /* Position label */ |
957 | - Label { |
958 | - id: musicToolbarFullPositionLabel |
959 | - anchors.left: parent.left |
960 | - anchors.leftMargin: units.gu(2) |
961 | - anchors.top: parent.top |
962 | - color: styleMusic.nowPlaying.labelColor |
963 | - fontSize: "x-small" |
964 | - height: parent.height |
965 | - horizontalAlignment: Text.AlignHCenter |
966 | - text: durationToString(player.position) |
967 | - verticalAlignment: Text.AlignVCenter |
968 | - width: units.gu(3) |
969 | - } |
970 | - |
971 | - /* Progress bar */ |
972 | - Rectangle { |
973 | - id: musicToolbarFullProgressBarContainer |
974 | - objectName: "progressBarShape" |
975 | - anchors.left: musicToolbarFullPositionLabel.right |
976 | - anchors.leftMargin: units.gu(2) |
977 | - anchors.right: musicToolbarFullDurationLabel.left |
978 | - anchors.rightMargin: units.gu(2) |
979 | - anchors.verticalCenter: parent.verticalCenter |
980 | - color: "transparent" |
981 | - height: units.gu(1); |
982 | - state: trackQueue.model.count === 0 ? "disabled" : "enabled" |
983 | - |
984 | - states: [ |
985 | - State { |
986 | - name: "disabled" |
987 | - PropertyChanges { |
988 | - target: musicToolbarFullProgressMouseArea |
989 | - enabled: false |
990 | - } |
991 | - PropertyChanges { |
992 | - target: musicToolbarFullProgressTrough |
993 | - visible: false |
994 | - } |
995 | - PropertyChanges { |
996 | - target: musicToolbarFullProgressHandle |
997 | - visible: false |
998 | - } |
999 | - }, |
1000 | - State { |
1001 | - name: "enabled" |
1002 | - PropertyChanges { |
1003 | - target: musicToolbarFullProgressMouseArea |
1004 | - enabled: true |
1005 | - } |
1006 | - PropertyChanges { |
1007 | - target: musicToolbarFullProgressTrough |
1008 | - visible: true |
1009 | - } |
1010 | - PropertyChanges { |
1011 | - target: musicToolbarFullProgressHandle |
1012 | - visible: true |
1013 | - } |
1014 | - } |
1015 | - ] |
1016 | - |
1017 | - property bool seeking: false |
1018 | - |
1019 | - onSeekingChanged: { |
1020 | - if (seeking === false) { |
1021 | - musicToolbarFullPositionLabel.text = durationToString(player.position) |
1022 | - } |
1023 | - } |
1024 | - |
1025 | - Connections { |
1026 | - target: player |
1027 | - onDurationChanged: { |
1028 | - console.debug("Duration changed: " + player.duration) |
1029 | - musicToolbarFullDurationLabel.text = durationToString(player.duration) |
1030 | - } |
1031 | - onPositionChanged: { |
1032 | - if (musicToolbarFullProgressBarContainer.seeking === false) |
1033 | - { |
1034 | - musicToolbarFullPositionLabel.text = durationToString(player.position) |
1035 | - musicToolbarFullDurationLabel.text = durationToString(player.duration) |
1036 | - musicToolbarFullProgressHandle.x = (player.position / player.duration) * musicToolbarFullProgressBarContainer.width |
1037 | - - musicToolbarFullProgressHandle.width / 2; |
1038 | - } |
1039 | - } |
1040 | - onStopped: { |
1041 | - musicToolbarFullProgressHandle.x = -musicToolbarFullProgressHandle.width / 2; |
1042 | - |
1043 | - musicToolbarFullPositionLabel.text = durationToString(0); |
1044 | - musicToolbarFullDurationLabel.text = durationToString(0); |
1045 | - } |
1046 | - } |
1047 | - |
1048 | - // Black background behind the progress bar |
1049 | - Rectangle { |
1050 | - id: musicToolbarFullProgressBackground |
1051 | - anchors.verticalCenter: parent.verticalCenter; |
1052 | - color: styleMusic.toolbar.fullProgressBackgroundColor; |
1053 | - height: parent.height; |
1054 | - radius: units.gu(0.5) |
1055 | - width: parent.width; |
1056 | - } |
1057 | - |
1058 | - // The orange fill of the progress bar |
1059 | - Rectangle { |
1060 | - id: musicToolbarFullProgressTrough |
1061 | - anchors.verticalCenter: parent.verticalCenter; |
1062 | - antialiasing: true |
1063 | - color: styleMusic.toolbar.fullProgressTroughColor; |
1064 | - height: parent.height; |
1065 | - radius: units.gu(0.5) |
1066 | - width: musicToolbarFullProgressHandle.x + (height / 2); // +radius |
1067 | - } |
1068 | - |
1069 | - // The current position (handle) of the progress bar |
1070 | - Rectangle { |
1071 | - id: musicToolbarFullProgressHandle |
1072 | - anchors.verticalCenter: musicToolbarFullProgressBackground.verticalCenter |
1073 | - antialiasing: true |
1074 | - color: styleMusic.nowPlaying.progressHandleColor |
1075 | - height: units.gu(1.5) |
1076 | - radius: height / 2 |
1077 | - width: height |
1078 | - |
1079 | - // On X change update the position string |
1080 | - onXChanged: { |
1081 | - if (musicToolbarFullProgressBarContainer.seeking) { |
1082 | - var fraction = (x + (width / 2)) / parent.width; |
1083 | - musicToolbarFullPositionLabel.text = durationToString(fraction * player.duration) |
1084 | - } |
1085 | - } |
1086 | - } |
1087 | - } |
1088 | - |
1089 | - /* Duration label */ |
1090 | - Label { |
1091 | - id: musicToolbarFullDurationLabel |
1092 | - anchors.right: parent.right |
1093 | - anchors.rightMargin: units.gu(2) |
1094 | - anchors.top: parent.top |
1095 | - color: styleMusic.nowPlaying.labelColor |
1096 | - fontSize: "x-small" |
1097 | - height: parent.height |
1098 | - horizontalAlignment: Text.AlignHCenter |
1099 | - text: durationToString(player.duration) |
1100 | - verticalAlignment: Text.AlignVCenter |
1101 | - width: units.gu(3) |
1102 | - } |
1103 | - |
1104 | - /* Border at the bottom */ |
1105 | - Rectangle { |
1106 | - anchors.bottom: parent.bottom |
1107 | - anchors.left: parent.left |
1108 | - anchors.right: parent.right |
1109 | - color: styleMusic.common.white |
1110 | - height: units.gu(0.1) |
1111 | - opacity: 0.1 |
1112 | - } |
1113 | - } |
1114 | - } |
1115 | + height: units.gu(7.25) |
1116 | + locked: true |
1117 | + opened: true |
1118 | |
1119 | /* Expanded toolbar */ |
1120 | Rectangle { |
1121 | @@ -713,12 +110,13 @@ |
1122 | fill: parent |
1123 | } |
1124 | color: "transparent" |
1125 | - visible: musicToolbarPanel.currentMode === "expanded" |
1126 | |
1127 | Rectangle { |
1128 | id: musicToolbarPlayerControls |
1129 | - anchors.fill: parent |
1130 | - color: styleMusic.playerControls.backgroundColor |
1131 | + anchors { |
1132 | + fill: parent |
1133 | + } |
1134 | + color: "#000" |
1135 | state: trackQueue.model.count === 0 ? "disabled" : "enabled" |
1136 | states: [ |
1137 | State { |
1138 | @@ -745,39 +143,55 @@ |
1139 | } |
1140 | ] |
1141 | |
1142 | + /* Disabled (empty state) controls */ |
1143 | Rectangle { |
1144 | id: disabledPlayerControlsGroup |
1145 | - anchors.fill: parent |
1146 | + anchors { |
1147 | + bottom: playerControlsProgressBar.top |
1148 | + left: parent.left |
1149 | + right: parent.right |
1150 | + top: parent.top |
1151 | + } |
1152 | color: "transparent" |
1153 | - visible: trackQueue.model.count === 0 |
1154 | |
1155 | Label { |
1156 | id: noSongsInQueueLabel |
1157 | anchors { |
1158 | left: parent.left |
1159 | + leftMargin: units.gu(2) |
1160 | right: disabledPlayerControlsPlayButton.left |
1161 | - margins: units.gu(1) |
1162 | - top: parent.top |
1163 | + rightMargin: units.gu(2) |
1164 | + verticalCenter: parent.verticalCenter |
1165 | } |
1166 | color: styleMusic.playerControls.labelColor |
1167 | - text: i18n.tr("Tap play to shuffle music") |
1168 | + text: i18n.tr("Tap to shuffle music") |
1169 | fontSize: "large" |
1170 | wrapMode: Text.WordWrap |
1171 | maximumLineCount: 2 |
1172 | } |
1173 | |
1174 | - Rectangle { |
1175 | + /* Play/Pause button */ |
1176 | + Icon { |
1177 | id: disabledPlayerControlsPlayButton |
1178 | - anchors.right: parent.right |
1179 | - anchors.rightMargin: units.gu(1) |
1180 | - anchors.verticalCenter: parent.verticalCenter |
1181 | - antialiasing: true |
1182 | - color: "#444" |
1183 | - height: units.gu(7) |
1184 | - radius: height / 2 |
1185 | + anchors { |
1186 | + right: parent.right |
1187 | + rightMargin: units.gu(3) |
1188 | + verticalCenter: parent.verticalCenter |
1189 | + } |
1190 | + color: "#FFF" |
1191 | + height: units.gu(2.5) |
1192 | + name: player.playbackState === MediaPlayer.PlayingState ? |
1193 | + "media-playback-pause" : "media-playback-start" |
1194 | + objectName: "disabledSmallPlayShape" |
1195 | width: height |
1196 | + } |
1197 | |
1198 | - function trigger() { |
1199 | + /* Click to shuffle music */ |
1200 | + MouseArea { |
1201 | + anchors { |
1202 | + fill: parent |
1203 | + } |
1204 | + onClicked: { |
1205 | if (emptyPage.noMusic) { |
1206 | return; |
1207 | } |
1208 | @@ -789,230 +203,65 @@ |
1209 | player.toggle(); |
1210 | } |
1211 | } |
1212 | - |
1213 | - // draws the outer shadow/highlight |
1214 | - Rectangle { |
1215 | - id: disabledSourceOutter |
1216 | - anchors { fill: parent; margins: -units.gu(0.1) } |
1217 | - radius: (width / 2) |
1218 | - antialiasing: true |
1219 | - gradient: Gradient { |
1220 | - GradientStop { position: 0.0; color: "black" } |
1221 | - GradientStop { position: 0.5; color: "transparent" } |
1222 | - GradientStop { position: 1.0; color: UbuntuColors.warmGrey } |
1223 | - } |
1224 | - |
1225 | - Rectangle { |
1226 | - anchors.verticalCenter: parent.verticalCenter |
1227 | - anchors.horizontalCenter: parent.horizontalCenter |
1228 | - antialiasing: true |
1229 | - color: "#444" |
1230 | - height: playerControlsPlayButton.height - units.gu(.1) |
1231 | - radius: height / 2 |
1232 | - width: height |
1233 | - |
1234 | - Rectangle { |
1235 | - id: disabledPlayerControlsPlayInnerCircle |
1236 | - anchors.horizontalCenter: parent.horizontalCenter |
1237 | - anchors.verticalCenter: parent.verticalCenter |
1238 | - antialiasing: true |
1239 | - height: units.gu(4.5) |
1240 | - radius: height / 2 |
1241 | - width: height |
1242 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
1243 | - |
1244 | - // draws the inner shadow/highlight |
1245 | - Rectangle { |
1246 | - id: disabledSourceInner |
1247 | - anchors { fill: parent; margins: -units.gu(0.1) } |
1248 | - radius: (width / 2) |
1249 | - antialiasing: true |
1250 | - gradient: Gradient { |
1251 | - GradientStop { position: 0.0; color: UbuntuColors.warmGrey } |
1252 | - GradientStop { position: 0.5; color: "transparent" } |
1253 | - GradientStop { position: 1.0; color: "black" } |
1254 | - } |
1255 | - |
1256 | - Rectangle { |
1257 | - anchors.verticalCenter: parent.verticalCenter |
1258 | - anchors.horizontalCenter: parent.horizontalCenter |
1259 | - antialiasing: true |
1260 | - height: playerControlsPlayInnerCircle.height - units.gu(.1) |
1261 | - radius: height / 2 |
1262 | - width: height |
1263 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
1264 | - |
1265 | - Image { |
1266 | - id: disabledPlayIndicator |
1267 | - height: units.gu(4) |
1268 | - width: height |
1269 | - anchors.horizontalCenter: parent.horizontalCenter |
1270 | - anchors.verticalCenter: parent.verticalCenter |
1271 | - opacity: emptyPage.noMusic ? .4 : 1 |
1272 | - source: player.playbackState === MediaPlayer.PlayingState ? |
1273 | - Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg") |
1274 | - } |
1275 | - } |
1276 | - } |
1277 | - } |
1278 | - } |
1279 | - } |
1280 | } |
1281 | } |
1282 | |
1283 | + /* Enabled (queue > 0) controls */ |
1284 | Rectangle { |
1285 | id: enabledPlayerControlsGroup |
1286 | - anchors.fill: parent |
1287 | + anchors { |
1288 | + bottom: playerControlsProgressBar.top |
1289 | + left: parent.left |
1290 | + right: parent.right |
1291 | + top: parent.top |
1292 | + } |
1293 | color: "transparent" |
1294 | - visible: trackQueue.model.count !== 0 |
1295 | - |
1296 | - /* Settings button */ |
1297 | - // TODO: Enable settings when it is practical |
1298 | - /* Rectangle { |
1299 | - id: playerControlsSettings |
1300 | - anchors.right: parent.right |
1301 | - anchors.verticalCenter: parent.verticalCenter |
1302 | - width: units.gu(6) |
1303 | - height: width |
1304 | - color: "transparent" |
1305 | - |
1306 | - Image { |
1307 | - anchors.horizontalCenter: parent.horizontalCenter |
1308 | - anchors.verticalCenter: parent.verticalCenter |
1309 | - height: units.gu(3) |
1310 | - source: Qt.resolvedUrl("images/settings.png") |
1311 | - width: height |
1312 | - } |
1313 | - |
1314 | - MouseArea { |
1315 | - anchors.fill: parent |
1316 | - onClicked: { |
1317 | - console.debug('Debug: Show settings') |
1318 | - PopupUtils.open(Qt.resolvedUrl("MusicSettings.qml"), mainView, |
1319 | - { |
1320 | - title: i18n.tr("Settings") |
1321 | - } ) |
1322 | - } |
1323 | - } |
1324 | - } */ |
1325 | - |
1326 | - /* Play/Pause button TODO: image and colours needs updating */ |
1327 | - Rectangle { |
1328 | - id: playerControlsPlayButton |
1329 | - anchors.right: parent.right |
1330 | - anchors.rightMargin: units.gu(1) |
1331 | - anchors.verticalCenter: parent.verticalCenter |
1332 | - antialiasing: true |
1333 | - color: "#444" |
1334 | - height: units.gu(7) |
1335 | - objectName: "smallPlayShape" |
1336 | - radius: height / 2 |
1337 | - width: height |
1338 | - |
1339 | - function trigger() { |
1340 | - if (emptyPage.noMusic) { |
1341 | - return; |
1342 | - } |
1343 | - |
1344 | - if (trackQueue.model.count === 0) { |
1345 | - playRandomSong(); |
1346 | - } |
1347 | - else { |
1348 | - player.toggle(); |
1349 | - } |
1350 | - } |
1351 | - |
1352 | - // draws the outer shadow/highlight |
1353 | - Rectangle { |
1354 | - id: sourceOutter |
1355 | - anchors { fill: parent; margins: -units.gu(0.1) } |
1356 | - radius: (width / 2) |
1357 | - antialiasing: true |
1358 | - gradient: Gradient { |
1359 | - GradientStop { position: 0.0; color: "black" } |
1360 | - GradientStop { position: 0.5; color: "transparent" } |
1361 | - GradientStop { position: 1.0; color: UbuntuColors.warmGrey } |
1362 | - } |
1363 | - |
1364 | - Rectangle { |
1365 | - anchors.verticalCenter: parent.verticalCenter |
1366 | - anchors.horizontalCenter: parent.horizontalCenter |
1367 | - antialiasing: true |
1368 | - color: "#444" |
1369 | - height: playerControlsPlayButton.height - units.gu(.1) |
1370 | - radius: height / 2 |
1371 | - width: height |
1372 | - |
1373 | - Rectangle { |
1374 | - id: playerControlsPlayInnerCircle |
1375 | - anchors.horizontalCenter: parent.horizontalCenter |
1376 | - anchors.verticalCenter: parent.verticalCenter |
1377 | - antialiasing: true |
1378 | - height: units.gu(4.5) |
1379 | - radius: height / 2 |
1380 | - width: height |
1381 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
1382 | - |
1383 | - // draws the inner shadow/highlight |
1384 | - Rectangle { |
1385 | - id: sourceInner |
1386 | - anchors { fill: parent; margins: -units.gu(0.1) } |
1387 | - radius: (width / 2) |
1388 | - antialiasing: true |
1389 | - gradient: Gradient { |
1390 | - GradientStop { position: 0.0; color: UbuntuColors.warmGrey } |
1391 | - GradientStop { position: 0.5; color: "transparent" } |
1392 | - GradientStop { position: 1.0; color: "black" } |
1393 | - } |
1394 | - |
1395 | - Rectangle { |
1396 | - anchors.verticalCenter: parent.verticalCenter |
1397 | - anchors.horizontalCenter: parent.horizontalCenter |
1398 | - antialiasing: true |
1399 | - height: playerControlsPlayInnerCircle.height - units.gu(.1) |
1400 | - radius: height / 2 |
1401 | - width: height |
1402 | - color: styleMusic.toolbar.fullInnerPlayCircleColor |
1403 | - |
1404 | - Image { |
1405 | - id: playindicator |
1406 | - height: units.gu(4) |
1407 | - width: height |
1408 | - anchors.horizontalCenter: parent.horizontalCenter |
1409 | - anchors.verticalCenter: parent.verticalCenter |
1410 | - opacity: emptyPage.noMusic ? .4 : 1 |
1411 | - source: player.playbackState === MediaPlayer.PlayingState ? |
1412 | - Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg") |
1413 | - } |
1414 | - } |
1415 | - } |
1416 | - } |
1417 | + |
1418 | + /* Album art in player controls */ |
1419 | + Image { |
1420 | + id: playerControlsImage |
1421 | + anchors { |
1422 | + bottom: parent.bottom |
1423 | + left: parent.left |
1424 | + top: parent.top |
1425 | + } |
1426 | + smooth: true |
1427 | + source: player.currentMetaArt === "" ? |
1428 | + decodeURIComponent("image://albumart/artist=" + |
1429 | + player.currentMetaArtist + |
1430 | + "&album=" + player.currentMetaAlbum) |
1431 | + : player.currentMetaArt |
1432 | + width: parent.height |
1433 | + |
1434 | + onStatusChanged: { |
1435 | + if (status === Image.Error) { |
1436 | + source = Qt.resolvedUrl("../images/music-app-cover@30.png") |
1437 | } |
1438 | } |
1439 | } |
1440 | |
1441 | - /* Container holding the labels for the toolbar */ |
1442 | - Rectangle { |
1443 | - id: playerControlLabelContainer |
1444 | - anchors.bottom: parent.bottom |
1445 | - anchors.left: parent.left |
1446 | - anchors.right: playerControlsPlayButton.left |
1447 | - anchors.top: parent.top |
1448 | - color: "transparent" |
1449 | + /* Column of meta labels */ |
1450 | + Column { |
1451 | + id: playerControlsLabels |
1452 | + anchors { |
1453 | + left: playerControlsImage.right |
1454 | + leftMargin: units.gu(1.5) |
1455 | + right: playerControlsPlayButton.left |
1456 | + rightMargin: units.gu(1) |
1457 | + verticalCenter: parent.verticalCenter |
1458 | + } |
1459 | |
1460 | /* Title of track */ |
1461 | Label { |
1462 | id: playerControlsTitle |
1463 | - anchors.left: parent.left |
1464 | - anchors.leftMargin: units.gu(1) |
1465 | - anchors.right: parent.right |
1466 | - anchors.rightMargin: units.gu(1) |
1467 | - anchors.top: parent.top |
1468 | - anchors.topMargin: units.gu(1) |
1469 | - color: styleMusic.playerControls.labelColor |
1470 | + anchors { |
1471 | + left: parent.left |
1472 | + right: parent.right |
1473 | + } |
1474 | + color: "#FFF" |
1475 | elide: Text.ElideRight |
1476 | - fontSize: "medium" |
1477 | - objectName: "playercontroltitle" |
1478 | + fontSize: "small" |
1479 | + font.weight: Font.DemiBold |
1480 | text: player.currentMetaTitle === "" |
1481 | ? player.source : player.currentMetaTitle |
1482 | } |
1483 | @@ -1020,119 +269,104 @@ |
1484 | /* Artist of track */ |
1485 | Label { |
1486 | id: playerControlsArtist |
1487 | - anchors.left: parent.left |
1488 | - anchors.leftMargin: units.gu(1) |
1489 | - anchors.right: parent.right |
1490 | - anchors.rightMargin: units.gu(1) |
1491 | - anchors.top: playerControlsTitle.bottom |
1492 | - color: styleMusic.playerControls.labelColor |
1493 | + anchors { |
1494 | + left: parent.left |
1495 | + right: parent.right |
1496 | + } |
1497 | + color: "#FFF" |
1498 | elide: Text.ElideRight |
1499 | fontSize: "small" |
1500 | + opacity: 0.4 |
1501 | text: player.currentMetaArtist |
1502 | } |
1503 | - |
1504 | - /* Album of track */ |
1505 | - Label { |
1506 | - id: playerControlsAlbum |
1507 | - anchors.left: parent.left |
1508 | - anchors.leftMargin: units.gu(1) |
1509 | - anchors.right: parent.right |
1510 | - anchors.rightMargin: units.gu(1) |
1511 | - anchors.top: playerControlsArtist.bottom |
1512 | - color: styleMusic.playerControls.labelColor |
1513 | - elide: Text.ElideRight |
1514 | - fontSize: "small" |
1515 | - text: player.currentMetaAlbum |
1516 | - } |
1517 | - } |
1518 | - |
1519 | + } |
1520 | + |
1521 | + /* Play/Pause button */ |
1522 | + Icon { |
1523 | + id: playerControlsPlayButton |
1524 | + anchors { |
1525 | + right: parent.right |
1526 | + rightMargin: units.gu(3) |
1527 | + verticalCenter: parent.verticalCenter |
1528 | + } |
1529 | + color: "#FFF" |
1530 | + height: units.gu(2.5) |
1531 | + name: player.playbackState === MediaPlayer.PlayingState ? |
1532 | + "media-playback-pause" : "media-playback-start" |
1533 | + objectName: "smallPlayShape" |
1534 | + width: height |
1535 | + } |
1536 | + |
1537 | + MouseArea { |
1538 | + anchors { |
1539 | + bottom: parent.bottom |
1540 | + horizontalCenter: playerControlsPlayButton.horizontalCenter |
1541 | + top: parent.top |
1542 | + } |
1543 | + onClicked: player.toggle() |
1544 | + width: units.gu(8) |
1545 | + |
1546 | + Rectangle { |
1547 | + anchors { |
1548 | + fill: parent |
1549 | + } |
1550 | + color: "#FFF" |
1551 | + opacity: parent.pressed ? 0.1 : 0 |
1552 | + |
1553 | + Behavior on opacity { |
1554 | + UbuntuNumberAnimation { |
1555 | + duration: UbuntuAnimation.FastDuration |
1556 | + } |
1557 | + } |
1558 | + } |
1559 | + } |
1560 | + |
1561 | + /* Mouse area to jump to now playing */ |
1562 | Rectangle { |
1563 | - anchors.fill: playerControlLabelContainer |
1564 | + anchors { |
1565 | + bottom: parent.bottom |
1566 | + left: parent.left |
1567 | + right: playerControlsLabels.right |
1568 | + top: parent.top |
1569 | + } |
1570 | color: "transparent" |
1571 | function trigger() { |
1572 | tabs.pushNowPlaying(); |
1573 | } |
1574 | } |
1575 | } |
1576 | - } |
1577 | - } |
1578 | - |
1579 | - /* Object which provides the progress bar when toolbar is minimized */ |
1580 | - Rectangle { |
1581 | - id: musicToolbarSmallProgressBackground |
1582 | - anchors { |
1583 | - bottom: parent.top |
1584 | - left: parent.left |
1585 | - right: parent.right |
1586 | - } |
1587 | - color: styleMusic.common.black |
1588 | - height: musicToolbarPanel.minimizedHeight |
1589 | - visible: (!musicToolbarPanel.animating && |
1590 | - !musicToolbarPanel.opened) |
1591 | - || musicToolbarPanel.currentMode == "expanded" |
1592 | - |
1593 | - Rectangle { |
1594 | - id: musicToolbarSmallProgressHint |
1595 | - anchors.left: parent.left |
1596 | - anchors.top: parent.top |
1597 | - color: styleMusic.nowPlaying.progressForegroundColor |
1598 | - height: parent.height |
1599 | - width: 0 |
1600 | - |
1601 | - Connections { |
1602 | - target: player |
1603 | - onPositionChanged: { |
1604 | - musicToolbarSmallProgressHint.width = (player.position / player.duration) * musicToolbarSmallProgressBackground.width |
1605 | - } |
1606 | - onStopped: { |
1607 | - musicToolbarSmallProgressHint.width = 0; |
1608 | - } |
1609 | - } |
1610 | - } |
1611 | - } |
1612 | - |
1613 | - /* Mouse events for the progress bar |
1614 | - is after musicToolbarMouseArea so that it captures mouse events for dragging */ |
1615 | - MouseArea { |
1616 | - id: musicToolbarFullProgressMouseArea |
1617 | - height: units.gu(2) |
1618 | - width: musicToolbarFullProgressBarContainer.width |
1619 | - x: musicToolbarFullProgressBarContainer.x |
1620 | - y: musicToolbarFullProgressBarContainer.y |
1621 | - |
1622 | - drag.axis: Drag.XAxis |
1623 | - drag.minimumX: -(musicToolbarFullProgressHandle.width / 2) |
1624 | - drag.maximumX: musicToolbarFullProgressBarContainer.width - (musicToolbarFullProgressHandle.width / 2) |
1625 | - drag.target: musicToolbarFullProgressHandle |
1626 | - |
1627 | - onPressed: { |
1628 | - musicToolbarFullProgressBarContainer.seeking = true; |
1629 | - |
1630 | - // Jump the handle to the current mouse position |
1631 | - musicToolbarFullProgressHandle.x = mouse.x - (musicToolbarFullProgressHandle.width / 2); |
1632 | - } |
1633 | - |
1634 | - onReleased: { |
1635 | - var fraction = mouse.x / musicToolbarFullProgressBarContainer.width; |
1636 | - |
1637 | - // Limit the bounds of the fraction |
1638 | - fraction = fraction < 0 ? 0 : fraction |
1639 | - fraction = fraction > 1 ? 1 : fraction |
1640 | - |
1641 | - player.seek((fraction) * player.duration); |
1642 | - musicToolbarFullProgressBarContainer.seeking = false; |
1643 | - } |
1644 | - } |
1645 | - |
1646 | - // Timer for autohide |
1647 | - Timer { |
1648 | - id: toolbarAutoHideTimer |
1649 | - interval: 5000 |
1650 | - repeat: false |
1651 | - running: false |
1652 | - onTriggered: { |
1653 | - if (currentPage !== nowPlaying) { // don't autohide on now playing |
1654 | - hideToolbar(); |
1655 | + |
1656 | + /* Object which provides the progress bar when toolbar is minimized */ |
1657 | + Rectangle { |
1658 | + id: playerControlsProgressBar |
1659 | + anchors { |
1660 | + bottom: parent.bottom |
1661 | + left: parent.left |
1662 | + right: parent.right |
1663 | + } |
1664 | + color: styleMusic.common.black |
1665 | + height: units.gu(0.25) |
1666 | + |
1667 | + Rectangle { |
1668 | + id: playerControlsProgressBarHint |
1669 | + anchors { |
1670 | + left: parent.left |
1671 | + top: parent.top |
1672 | + } |
1673 | + color: UbuntuColors.blue |
1674 | + height: parent.height |
1675 | + width: 0 |
1676 | + |
1677 | + Connections { |
1678 | + target: player |
1679 | + onPositionChanged: { |
1680 | + playerControlsProgressBarHint.width = (player.position / player.duration) * playerControlsProgressBar.width |
1681 | + } |
1682 | + onStopped: { |
1683 | + playerControlsProgressBarHint.width = 0; |
1684 | + } |
1685 | + } |
1686 | + } |
1687 | } |
1688 | } |
1689 | } |
1690 | |
1691 | === modified file 'MusicTracks.qml' |
1692 | --- MusicTracks.qml 2014-09-20 15:41:33 +0000 |
1693 | +++ MusicTracks.qml 2014-10-06 02:21:13 +0000 |
1694 | @@ -36,8 +36,9 @@ |
1695 | |
1696 | ListView { |
1697 | id: tracklist |
1698 | - anchors.fill: parent |
1699 | - anchors.bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
1700 | + anchors { |
1701 | + fill: parent |
1702 | + } |
1703 | highlightFollowsCurrentItem: false |
1704 | objectName: "trackstab-listview" |
1705 | model: SortFilterModel { |
1706 | |
1707 | === modified file 'MusicaddtoPlaylist.qml' |
1708 | --- MusicaddtoPlaylist.qml 2014-09-20 10:50:45 +0000 |
1709 | +++ MusicaddtoPlaylist.qml 2014-10-06 02:21:13 +0000 |
1710 | @@ -65,7 +65,6 @@ |
1711 | ListView { |
1712 | id: addtoPlaylistView |
1713 | anchors { |
1714 | - bottomMargin: musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
1715 | fill: parent |
1716 | } |
1717 | clip: true |
1718 | |
1719 | === modified file 'Player.qml' |
1720 | --- Player.qml 2014-09-20 15:41:33 +0000 |
1721 | +++ Player.qml 2014-10-06 02:21:13 +0000 |
1722 | @@ -187,7 +187,11 @@ |
1723 | else { |
1724 | var obj = trackQueue.model.get(player.currentIndex); |
1725 | currentMetaAlbum = obj.album; |
1726 | - currentMetaArt = obj.art; |
1727 | + |
1728 | + if (obj.art !== undefined) { // FIXME: protect against not art property in playlists |
1729 | + currentMetaArt = obj.art; |
1730 | + } |
1731 | + |
1732 | currentMetaArtist = obj.author; |
1733 | currentMetaFile = obj.filename; |
1734 | currentMetaTitle = obj.title; |
1735 | |
1736 | === modified file 'Style.qml' |
1737 | --- Style.qml 2014-09-20 10:50:45 +0000 |
1738 | +++ Style.qml 2014-10-06 02:21:13 +0000 |
1739 | @@ -34,8 +34,8 @@ |
1740 | property QtObject common: QtObject { |
1741 | property color black: "#000000"; |
1742 | property color white: "#FFFFFF"; |
1743 | - property color music: "#333333"; |
1744 | - property color subtitle: "#666666"; |
1745 | + property color music: "#FFFFFF"; |
1746 | + property color subtitle: "#999999"; |
1747 | property color expandedColor: "#000000"; |
1748 | property int albumSize: units.gu(10); |
1749 | property int itemHeight: units.gu(12); |
1750 | |
1751 | === modified file 'com.ubuntu.music_music.desktop.in.in' |
1752 | --- com.ubuntu.music_music.desktop.in.in 2014-07-21 14:49:14 +0000 |
1753 | +++ com.ubuntu.music_music.desktop.in.in 2014-10-06 02:21:13 +0000 |
1754 | @@ -9,4 +9,7 @@ |
1755 | StartupNotify=true |
1756 | X-Ubuntu-Touch=true |
1757 | X-Ubuntu-Single-Instance=true |
1758 | +X-Ubuntu-Splash-Show-Header=true |
1759 | +_X-Ubuntu-Splash-Title=Music |
1760 | +_X-Ubuntu-Splash-Color=#1e1e23 |
1761 | X-Ubuntu-Default-Department-ID=sound-video |
1762 | |
1763 | === modified file 'common/AlbumsPage.qml' |
1764 | --- common/AlbumsPage.qml 2014-09-20 15:41:33 +0000 |
1765 | +++ common/AlbumsPage.qml 2014-10-06 02:21:13 +0000 |
1766 | @@ -28,7 +28,6 @@ |
1767 | |
1768 | MusicPage { |
1769 | id: albumStackPage |
1770 | - anchors.bottomMargin: units.gu(.5) |
1771 | objectName: "albumsArtistPage" |
1772 | visible: false |
1773 | |
1774 | @@ -38,7 +37,6 @@ |
1775 | ListView { |
1776 | id: albumtrackslist |
1777 | anchors { |
1778 | - bottomMargin: wideAspect ? musicToolbar.fullHeight : musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
1779 | fill: parent |
1780 | } |
1781 | delegate: albumTracksDelegate |
1782 | |
1783 | === modified file 'common/BlurredBackground.qml' |
1784 | --- common/BlurredBackground.qml 2014-09-20 15:41:33 +0000 |
1785 | +++ common/BlurredBackground.qml 2014-10-06 02:21:13 +0000 |
1786 | @@ -23,8 +23,14 @@ |
1787 | |
1788 | // Blurred background |
1789 | Rectangle { |
1790 | - anchors.fill: parent |
1791 | - property string art: player.currentMetaFile === "" ? Qt.resolvedUrl("../images/music-app-cover@30.png") : player.currentMetaArt |
1792 | + width: parent.width |
1793 | + property string art // : player.currentMetaFile === "" ? Qt.resolvedUrl("../images/music-app-cover@30.png") : player.currentMetaArt |
1794 | + |
1795 | + // dark layer |
1796 | + Rectangle { |
1797 | + anchors.fill: parent |
1798 | + color: "black" |
1799 | + } |
1800 | |
1801 | // the album art |
1802 | Image { |
1803 | @@ -32,7 +38,8 @@ |
1804 | anchors.horizontalCenter: parent.horizontalCenter |
1805 | anchors.verticalCenter: parent.verticalCenter |
1806 | source: art // this has to be fixed for the default cover art to work - cant find in this dir |
1807 | - height: Math.max(parent.height, parent.width) |
1808 | + fillMode: Image.PreserveAspectCrop |
1809 | + height: parent.height |
1810 | width: Math.max(parent.height, parent.width) |
1811 | visible: false |
1812 | onStatusChanged: { |
1813 | @@ -47,12 +54,7 @@ |
1814 | anchors.fill: backgroundImage |
1815 | source: backgroundImage |
1816 | radius: units.dp(42) |
1817 | - } |
1818 | - // transparent white layer |
1819 | - Rectangle { |
1820 | - anchors.fill: parent |
1821 | - color: "white" |
1822 | - opacity: 0.7 |
1823 | + opacity: 0.2 |
1824 | } |
1825 | onArtChanged: { |
1826 | // TODO: This is a work around for LP:1261078 and LP:1306845. Ideally, |
1827 | |
1828 | === modified file 'common/MusicPage.qml' |
1829 | --- common/MusicPage.qml 2014-08-20 17:35:52 +0000 |
1830 | +++ common/MusicPage.qml 2014-10-06 02:21:13 +0000 |
1831 | @@ -23,6 +23,10 @@ |
1832 | // generic page for music, could be useful for bottomedge implementation |
1833 | Page { |
1834 | id: thisPage |
1835 | + anchors { |
1836 | + bottomMargin: musicToolbar.visible ? musicToolbar.currentHeight : 0 |
1837 | + fill: parent |
1838 | + } |
1839 | |
1840 | onVisibleChanged: { |
1841 | if (visible) { |
1842 | |
1843 | === modified file 'common/MusicRow.qml' |
1844 | --- common/MusicRow.qml 2014-09-20 10:50:45 +0000 |
1845 | +++ common/MusicRow.qml 2014-10-06 02:21:13 +0000 |
1846 | @@ -24,12 +24,13 @@ |
1847 | Row { |
1848 | anchors { |
1849 | left: parent.left |
1850 | - leftMargin: units.gu(1) |
1851 | + leftMargin: units.gu(2) |
1852 | right: parent.right |
1853 | - rightMargin: units.gu(1) |
1854 | + rightMargin: units.gu(2) |
1855 | } |
1856 | |
1857 | property alias covers: coverRow.covers |
1858 | + property bool showCovers: true |
1859 | property alias pressed: coverRow.pressed |
1860 | property alias column: columnComponent.sourceComponent |
1861 | |
1862 | @@ -37,6 +38,7 @@ |
1863 | |
1864 | CoverRow { |
1865 | id: coverRow |
1866 | + visible: showCovers |
1867 | anchors { |
1868 | top: parent.top |
1869 | topMargin: units.gu(1) |
1870 | @@ -50,9 +52,10 @@ |
1871 | id: columnComponent |
1872 | anchors { |
1873 | top: parent.top |
1874 | - topMargin: units.gu(2) |
1875 | + topMargin: units.gu(1) |
1876 | } |
1877 | - width: parent.width - coverRow.width - parent.spacing |
1878 | + width: showCovers ? parent.width - coverRow.width - parent.spacing |
1879 | + : parent.width - parent.spacing |
1880 | |
1881 | onSourceComponentChanged: { |
1882 | for (var i=0; i < item.children.length; i++) { |
1883 | |
1884 | === modified file 'common/SongsPage.qml' |
1885 | --- common/SongsPage.qml 2014-09-20 15:41:33 +0000 |
1886 | +++ common/SongsPage.qml 2014-10-06 02:21:13 +0000 |
1887 | @@ -29,7 +29,6 @@ |
1888 | |
1889 | MusicPage { |
1890 | id: songStackPage |
1891 | - anchors.bottomMargin: units.gu(.5) |
1892 | objectName: "songsPage" |
1893 | visible: false |
1894 | |
1895 | @@ -52,7 +51,6 @@ |
1896 | ListView { |
1897 | id: albumtrackslist |
1898 | anchors { |
1899 | - bottomMargin: wideAspect ? musicToolbar.fullHeight : musicToolbar.mouseAreaOffset + musicToolbar.minimizedHeight |
1900 | fill: parent |
1901 | } |
1902 | delegate: albumTracksDelegate |
1903 | @@ -61,19 +59,49 @@ |
1904 | width: parent.width |
1905 | header: ListItem.Standard { |
1906 | id: albumInfo |
1907 | - height: units.gu(22) |
1908 | - |
1909 | - CoverRow { |
1910 | + height: albumArtist.visible ? units.gu(33) : units.gu(30) |
1911 | + |
1912 | + BlurredBackground { |
1913 | + id: blurredBackground |
1914 | + height: parent.height |
1915 | + art: albumImage.source |
1916 | + } |
1917 | + |
1918 | + Image { |
1919 | id: albumImage |
1920 | anchors { |
1921 | top: parent.top |
1922 | left: parent.left |
1923 | - margins: units.gu(1) |
1924 | - } |
1925 | - count: songStackPage.covers.length |
1926 | - size: units.gu(20) |
1927 | - covers: songStackPage.covers |
1928 | - spacing: units.gu(2) |
1929 | + topMargin: units.gu(3) |
1930 | + bottomMargin: units.gu(2) |
1931 | + leftMargin: units.gu(2) |
1932 | + rightMargin: units.gu(2) |
1933 | + } |
1934 | + width: units.gu(18) |
1935 | + height: width |
1936 | + smooth: true |
1937 | + source: covers.length > 0 |
1938 | + ? (covers[0].art !== undefined |
1939 | + ? covers[0].art |
1940 | + : decodeURIComponent("image://albumart/artist=" + covers[0].author + "&album=" + covers[0].album)) |
1941 | + : Qt.resolvedUrl("../images/music-app-cover@30.png") |
1942 | + } |
1943 | + |
1944 | + Label { |
1945 | + id: albumLabel |
1946 | + wrapMode: Text.NoWrap |
1947 | + maximumLineCount: 1 |
1948 | + fontSize: "x-large" |
1949 | + color: styleMusic.common.music |
1950 | + anchors { |
1951 | + top: albumImage.bottom |
1952 | + topMargin: units.gu(1) |
1953 | + left: albumImage.left |
1954 | + right: parent.right |
1955 | + rightMargin: units.gu(2) |
1956 | + } |
1957 | + elide: Text.ElideRight |
1958 | + text: line2 |
1959 | } |
1960 | |
1961 | Label { |
1962 | @@ -83,77 +111,115 @@ |
1963 | maximumLineCount: 1 |
1964 | fontSize: "small" |
1965 | color: styleMusic.common.subtitle |
1966 | - anchors.left: albumImage.right |
1967 | - anchors.leftMargin: units.gu(1) |
1968 | - anchors.top: parent.top |
1969 | - anchors.topMargin: units.gu(1.5) |
1970 | - anchors.right: parent.right |
1971 | - anchors.rightMargin: units.gu(1.5) |
1972 | + visible: text !== i18n.tr("Playlist") && |
1973 | + text !== i18n.tr("Genre") |
1974 | + anchors { |
1975 | + top: albumLabel.bottom |
1976 | + topMargin: units.gu(0.75) |
1977 | + left: albumImage.left |
1978 | + right: parent.right |
1979 | + rightMargin: units.gu(2) |
1980 | + } |
1981 | elide: Text.ElideRight |
1982 | text: line1 |
1983 | } |
1984 | - Label { |
1985 | - id: albumLabel |
1986 | - wrapMode: Text.NoWrap |
1987 | - maximumLineCount: 2 |
1988 | - fontSize: "medium" |
1989 | - color: styleMusic.common.music |
1990 | - anchors.left: albumImage.right |
1991 | - anchors.leftMargin: units.gu(1) |
1992 | - anchors.top: albumArtist.bottom |
1993 | - anchors.topMargin: units.gu(0.8) |
1994 | - anchors.right: parent.right |
1995 | - anchors.rightMargin: units.gu(1.5) |
1996 | - elide: Text.ElideRight |
1997 | - text: line2 |
1998 | - } |
1999 | + |
2000 | Label { |
2001 | id: albumYear |
2002 | wrapMode: Text.NoWrap |
2003 | maximumLineCount: 1 |
2004 | - fontSize: "x-small" |
2005 | + fontSize: "small" |
2006 | color: styleMusic.common.subtitle |
2007 | - anchors.left: albumImage.right |
2008 | - anchors.leftMargin: units.gu(1) |
2009 | - anchors.top: albumLabel.bottom |
2010 | - anchors.topMargin: units.gu(2) |
2011 | - anchors.right: parent.right |
2012 | - anchors.rightMargin: units.gu(1.5) |
2013 | + anchors { |
2014 | + top: albumArtist.visible ? albumArtist.bottom |
2015 | + : albumLabel.bottom |
2016 | + topMargin: units.gu(1) |
2017 | + left: albumImage.left |
2018 | + right: parent.right |
2019 | + rightMargin: units.gu(2) |
2020 | + } |
2021 | elide: Text.ElideRight |
2022 | text: isAlbum && line1 !== i18n.tr("Genre") ? year + " | " + i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count) |
2023 | : i18n.tr("%1 song", "%1 songs", albumtrackslist.count).arg(albumtrackslist.count) |
2024 | |
2025 | } |
2026 | |
2027 | + // Shuffle |
2028 | + Button { |
2029 | + id: shuffleRow |
2030 | + anchors { |
2031 | + bottom: queueAllRow.top |
2032 | + bottomMargin: units.gu(2) |
2033 | + left: albumImage.right |
2034 | + leftMargin: units.gu(2) |
2035 | + } |
2036 | + strokeColor: UbuntuColors.green |
2037 | + height: units.gu(4) |
2038 | + width: units.gu(15) |
2039 | + Text { |
2040 | + anchors { |
2041 | + centerIn: parent |
2042 | + } |
2043 | + color: "white" |
2044 | + text: i18n.tr("Shuffle") |
2045 | + } |
2046 | + MouseArea { |
2047 | + anchors.fill: parent |
2048 | + onClicked: { |
2049 | + shuffleModel(albumtrackslist.model) // play track |
2050 | + |
2051 | + if (isAlbum && songStackPage.line1 !== i18n.tr("Genre")) { |
2052 | + Library.addRecent(songStackPage.line2, songStackPage.line1, songStackPage.covers[0], songStackPage.line2, "album") |
2053 | + mainView.hasRecent = true |
2054 | + recentModel.filterRecent() |
2055 | + } else if (songStackPage.line1 === i18n.tr("Playlist")) { |
2056 | + Library.addRecent(songStackPage.line2, "Playlist", songStackPage.covers[0], songStackPage.line2, "playlist") |
2057 | + mainView.hasRecent = true |
2058 | + recentModel.filterRecent() |
2059 | + } |
2060 | + } |
2061 | + } |
2062 | + } |
2063 | + |
2064 | + // Queue |
2065 | + Button { |
2066 | + id: queueAllRow |
2067 | + anchors { |
2068 | + bottom: playRow.top |
2069 | + bottomMargin: units.gu(2) |
2070 | + left: albumImage.right |
2071 | + leftMargin: units.gu(2) |
2072 | + } |
2073 | + strokeColor: UbuntuColors.green |
2074 | + height: units.gu(4) |
2075 | + width: units.gu(15) |
2076 | + Text { |
2077 | + anchors { |
2078 | + centerIn: parent |
2079 | + } |
2080 | + color: "white" |
2081 | + text: i18n.tr("Queue all") |
2082 | + } |
2083 | + MouseArea { |
2084 | + anchors.fill: parent |
2085 | + onClicked: { |
2086 | + addQueueFromModel(albumtrackslist.model) |
2087 | + } |
2088 | + } |
2089 | + } |
2090 | + |
2091 | // Play |
2092 | - Rectangle { |
2093 | + Button { |
2094 | id: playRow |
2095 | - anchors.top: albumYear.bottom |
2096 | - anchors.topMargin: units.gu(1) |
2097 | - anchors.left: albumImage.right |
2098 | - anchors.leftMargin: units.gu(1) |
2099 | - color: "transparent" |
2100 | + anchors { |
2101 | + bottom: albumImage.bottom |
2102 | + left: albumImage.right |
2103 | + leftMargin: units.gu(2) |
2104 | + } |
2105 | + color: UbuntuColors.green |
2106 | height: units.gu(4) |
2107 | width: units.gu(15) |
2108 | - Icon { |
2109 | - id: playTrack |
2110 | - objectName: "songspage-playtrack" |
2111 | - anchors.verticalCenter: parent.verticalCenter |
2112 | - name: "media-playback-start" |
2113 | - height: styleMusic.common.expandedItem |
2114 | - width: styleMusic.common.expandedItem |
2115 | - } |
2116 | - Label { |
2117 | - anchors.left: playTrack.right |
2118 | - anchors.leftMargin: units.gu(0.5) |
2119 | - anchors.verticalCenter: parent.verticalCenter |
2120 | - fontSize: "small" |
2121 | - color: styleMusic.common.subtitle |
2122 | - width: parent.width - playTrack.width - units.gu(1) |
2123 | - text: i18n.tr("Play all") |
2124 | - wrapMode: Text.WordWrap |
2125 | - maximumLineCount: 3 |
2126 | - } |
2127 | + text: i18n.tr("Play all") |
2128 | MouseArea { |
2129 | anchors.fill: parent |
2130 | onClicked: { |
2131 | @@ -171,43 +237,6 @@ |
2132 | } |
2133 | } |
2134 | } |
2135 | - |
2136 | - // Queue |
2137 | - Rectangle { |
2138 | - id: queueAllRow |
2139 | - anchors.top: playRow.bottom |
2140 | - anchors.topMargin: units.gu(1) |
2141 | - anchors.left: albumImage.right |
2142 | - anchors.leftMargin: units.gu(1) |
2143 | - color: "transparent" |
2144 | - height: units.gu(4) |
2145 | - width: units.gu(15) |
2146 | - Icon { |
2147 | - id: queueAll |
2148 | - objectName: "songspage-queue-all" |
2149 | - anchors.verticalCenter: parent.verticalCenter |
2150 | - name: "add" |
2151 | - height: styleMusic.common.expandedItem |
2152 | - width: styleMusic.common.expandedItem |
2153 | - } |
2154 | - Label { |
2155 | - anchors.left: queueAll.right |
2156 | - anchors.leftMargin: units.gu(0.5) |
2157 | - anchors.verticalCenter: parent.verticalCenter |
2158 | - fontSize: "small" |
2159 | - color: styleMusic.common.subtitle |
2160 | - width: parent.width - queueAll.width - units.gu(1) |
2161 | - text: i18n.tr("Add to queue") |
2162 | - wrapMode: Text.WordWrap |
2163 | - maximumLineCount: 3 |
2164 | - } |
2165 | - MouseArea { |
2166 | - anchors.fill: parent |
2167 | - onClicked: { |
2168 | - addQueueFromModel(albumtrackslist.model) |
2169 | - } |
2170 | - } |
2171 | - } |
2172 | } |
2173 | |
2174 | Component { |
2175 | @@ -219,7 +248,8 @@ |
2176 | objectName: "songsPageListItem" + index |
2177 | iconFrame: false |
2178 | progression: false |
2179 | - height: styleMusic.common.itemHeight |
2180 | + showDivider: false |
2181 | + height: units.gu(6) |
2182 | |
2183 | leftSideAction: songStackPage.line1 === i18n.tr("Playlist") |
2184 | ? playlistRemoveAction.item : null |
2185 | @@ -272,30 +302,23 @@ |
2186 | |
2187 | MusicRow { |
2188 | id: musicRow |
2189 | - covers: model.art !== undefined ? [{art: model.art}] : [{author: model.author, album: model.album}] |
2190 | + covers: [] |
2191 | + showCovers: false |
2192 | column: Column { |
2193 | - spacing: units.gu(1) |
2194 | + Label { |
2195 | + id: trackTitle |
2196 | + color: styleMusic.common.music |
2197 | + fontSize: "small" |
2198 | + objectName: "songspage-tracktitle" |
2199 | + text: model.title |
2200 | + } |
2201 | + |
2202 | Label { |
2203 | id: trackArtist |
2204 | color: styleMusic.common.subtitle |
2205 | fontSize: "x-small" |
2206 | text: model.author |
2207 | } |
2208 | - |
2209 | - Label { |
2210 | - id: trackTitle |
2211 | - color: styleMusic.common.subtitle |
2212 | - fontSize: "medium" |
2213 | - objectName: "songspage-tracktitle" |
2214 | - text: model.title |
2215 | - } |
2216 | - |
2217 | - Label { |
2218 | - id: trackAlbum |
2219 | - color: styleMusic.common.subtitle |
2220 | - fontSize: "xx-small" |
2221 | - text: model.album |
2222 | - } |
2223 | } |
2224 | } |
2225 | |
2226 | |
2227 | === modified file 'music-app.qml' |
2228 | --- music-app.qml 2014-09-23 15:59:28 +0000 |
2229 | +++ music-app.qml 2014-10-06 02:21:13 +0000 |
2230 | @@ -40,18 +40,13 @@ |
2231 | id: mainView |
2232 | useDeprecatedToolbar: false |
2233 | |
2234 | - // Use toolbar color for header |
2235 | - headerColor: styleMusic.toolbar.fullBackgroundColor |
2236 | - backgroundColor: styleMusic.toolbar.fullBackgroundColor |
2237 | + backgroundColor: "#1e1e23" |
2238 | + headerColor: "#1e1e23" |
2239 | |
2240 | // Global keyboard shortcuts |
2241 | focus: true |
2242 | Keys.onPressed: { |
2243 | - if (event.key === Qt.Key_Alt) { |
2244 | - // On alt key press show toolbar and start autohide timer |
2245 | - musicToolbar.showToolbar(); |
2246 | - } |
2247 | - else if(event.key === Qt.Key_Escape) { |
2248 | + if(event.key === Qt.Key_Escape) { |
2249 | musicToolbar.goBack(); // Esc Go back |
2250 | } |
2251 | else if(event.modifiers === Qt.AltModifier) { |
2252 | @@ -96,11 +91,9 @@ |
2253 | case Qt.Key_J: // Ctrl+J Jump to playing song |
2254 | nowPlaying.visible = true; |
2255 | nowPlaying.positionAt(player.currentIndex); |
2256 | - musicToolbar.showToolbar(); |
2257 | break; |
2258 | case Qt.Key_N: // Ctrl+N Show now playing |
2259 | nowPlaying.visible = true; |
2260 | - musicToolbar.showToolbar(); |
2261 | break; |
2262 | case Qt.Key_P: // Ctrl+P Toggle playing state |
2263 | player.toggle(); |
2264 | @@ -577,12 +570,6 @@ |
2265 | if (args.values.url) { |
2266 | uriHandler.process(args.values.url, true); |
2267 | } |
2268 | - |
2269 | - // Show toolbar and start timer if there is music |
2270 | - if (!emptyPage.noMusic) { |
2271 | - musicToolbar.showToolbar(); |
2272 | - musicToolbar.startAutohideTimer(); |
2273 | - } |
2274 | } |
2275 | |
2276 | // VARIABLES |
2277 | @@ -594,11 +581,10 @@ |
2278 | property string lastfmpassword |
2279 | property string timestamp // used to scrobble |
2280 | property var chosenElement: null |
2281 | - property bool toolbarShown: musicToolbar.shown |
2282 | + property bool toolbarShown: musicToolbar.visible |
2283 | property bool selectedAlbum: false |
2284 | |
2285 | signal listItemSwiping(int i) |
2286 | - signal onToolbarShownChanged(bool shown, var currentPage, var currentTab) |
2287 | |
2288 | property bool wideAspect: width >= units.gu(70) && loadedUI |
2289 | property bool loadedUI: false // property to detect if the UI has finished |
2290 | @@ -680,8 +666,6 @@ |
2291 | // Show the Now Playing page and make sure the track is visible |
2292 | tabs.pushNowPlaying(); |
2293 | nowPlaying.ensureVisibleIndex = index; |
2294 | - |
2295 | - musicToolbar.showToolbar(); |
2296 | } |
2297 | else { |
2298 | player.source = file; |
2299 | @@ -699,8 +683,6 @@ |
2300 | // Show the Now Playing page and make sure the track is visible |
2301 | tabs.pushNowPlaying(); |
2302 | nowPlaying.ensureVisibleIndex = index; |
2303 | - |
2304 | - musicToolbar.showToolbar(); |
2305 | } |
2306 | |
2307 | function playRandomSong(shuffle) |
2308 | @@ -716,6 +698,17 @@ |
2309 | trackClicked(allSongsModel, index, true) |
2310 | } |
2311 | |
2312 | + function shuffleModel(model) |
2313 | + { |
2314 | + var now = new Date(); |
2315 | + var seed = now.getSeconds(); |
2316 | + var index = Math.floor(model.count * Math.random(seed)); |
2317 | + |
2318 | + player.shuffle = true; |
2319 | + |
2320 | + trackClicked(model, index, true) |
2321 | + } |
2322 | + |
2323 | // Load mediascanner store |
2324 | MediaStore { |
2325 | id: musicStore |
2326 | @@ -867,10 +860,6 @@ |
2327 | id: searchSheet |
2328 | } |
2329 | |
2330 | - // Blurred background |
2331 | - BlurredBackground { |
2332 | - } |
2333 | - |
2334 | // Popover for tracks, queue and add to playlist, for example |
2335 | Component { |
2336 | id: trackPopoverComponent |
2337 | @@ -973,6 +962,7 @@ |
2338 | |
2339 | MusicToolbar { |
2340 | id: musicToolbar |
2341 | + visible: nowPlaying.isListView || !nowPlaying.visible |
2342 | objectName: "musicToolbarObject" |
2343 | z: 200 // put on top of everything else |
2344 | } |
2345 | @@ -983,7 +973,6 @@ |
2346 | Tabs { |
2347 | id: tabs |
2348 | anchors { |
2349 | - bottomMargin: wideAspect ? musicToolbar.fullHeight : undefined |
2350 | fill: parent |
2351 | } |
2352 | |
2353 | |
2354 | === modified file 'po/com.ubuntu.music.pot' |
2355 | --- po/com.ubuntu.music.pot 2014-09-23 12:44:36 +0000 |
2356 | +++ po/com.ubuntu.music.pot 2014-10-06 02:21:13 +0000 |
2357 | @@ -8,7 +8,7 @@ |
2358 | msgstr "" |
2359 | "Project-Id-Version: music-app\n" |
2360 | "Report-Msgid-Bugs-To: \n" |
2361 | -"POT-Creation-Date: 2014-09-23 13:43+0100\n" |
2362 | +"POT-Creation-Date: 2014-10-02 20:40-0500\n" |
2363 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
2364 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
2365 | "Language-Team: LANGUAGE <LL@li.org>\n" |
2366 | @@ -76,7 +76,7 @@ |
2367 | |
2368 | #: ../MusicArtists.qml:113 ../MusicPlaylists.qml:180 ../MusicStart.qml:371 |
2369 | #: ../MusicaddtoPlaylist.qml:106 ../common/AlbumsPage.qml:331 |
2370 | -#: ../common/SongsPage.qml:123 ../common/SongsPage.qml:124 |
2371 | +#: ../common/SongsPage.qml:138 ../common/SongsPage.qml:139 |
2372 | #, qt-format |
2373 | msgid "%1 song" |
2374 | msgid_plural "%1 songs" |
2375 | @@ -114,31 +114,32 @@ |
2376 | msgid "Change" |
2377 | msgstr "" |
2378 | |
2379 | -#: ../MusicPlaylists.qml:96 ../music-app.qml:956 |
2380 | +#: ../MusicPlaylists.qml:96 ../music-app.qml:962 |
2381 | msgid "Playlist already exists" |
2382 | msgstr "" |
2383 | |
2384 | -#: ../MusicPlaylists.qml:100 ../music-app.qml:961 |
2385 | +#: ../MusicPlaylists.qml:100 ../music-app.qml:967 |
2386 | msgid "Please type in a name." |
2387 | msgstr "" |
2388 | |
2389 | -#: ../MusicPlaylists.qml:105 ../music-app.qml:493 ../music-app.qml:967 |
2390 | +#: ../MusicPlaylists.qml:105 ../music-app.qml:492 ../music-app.qml:973 |
2391 | msgid "Cancel" |
2392 | msgstr "" |
2393 | |
2394 | #: ../MusicPlaylists.qml:159 ../MusicPlaylists.qml:163 ../MusicStart.qml:118 |
2395 | -#: ../MusicStart.qml:200 ../common/SongsPage.qml:166 |
2396 | -#: ../common/SongsPage.qml:224 ../common/SongsPage.qml:226 |
2397 | -#: ../common/SongsPage.qml:244 |
2398 | +#: ../MusicStart.qml:200 ../common/SongsPage.qml:114 |
2399 | +#: ../common/SongsPage.qml:171 ../common/SongsPage.qml:228 |
2400 | +#: ../common/SongsPage.qml:250 ../common/SongsPage.qml:252 |
2401 | +#: ../common/SongsPage.qml:270 |
2402 | msgid "Playlist" |
2403 | msgstr "" |
2404 | |
2405 | -#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:519 |
2406 | -#: ../music-app.qml:93 ../music-app.qml:141 ../music-app.qml:147 |
2407 | +#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:522 |
2408 | +#: ../music-app.qml:92 ../music-app.qml:140 ../music-app.qml:146 |
2409 | msgid "Search" |
2410 | msgstr "" |
2411 | |
2412 | -#: ../MusicSettings.qml:30 ../music-app.qml:191 |
2413 | +#: ../MusicSettings.qml:30 ../music-app.qml:190 |
2414 | msgid "Settings" |
2415 | msgstr "" |
2416 | |
2417 | @@ -224,7 +225,7 @@ |
2418 | msgid "Clean everything!" |
2419 | msgstr "" |
2420 | |
2421 | -#: ../MusicStart.qml:35 ../music-app.qml:589 ../music-app.qml:1150 |
2422 | +#: ../MusicStart.qml:35 ../music-app.qml:588 ../music-app.qml:1156 |
2423 | #: com.ubuntu.music_music.desktop.in.in.h:1 |
2424 | msgid "Music" |
2425 | msgstr "" |
2426 | @@ -241,13 +242,14 @@ |
2427 | msgid "Genres" |
2428 | msgstr "" |
2429 | |
2430 | -#: ../MusicStart.qml:316 ../MusicStart.qml:318 ../common/SongsPage.qml:123 |
2431 | -#: ../common/SongsPage.qml:162 ../common/SongsPage.qml:240 |
2432 | +#: ../MusicStart.qml:316 ../MusicStart.qml:318 ../common/SongsPage.qml:115 |
2433 | +#: ../common/SongsPage.qml:138 ../common/SongsPage.qml:167 |
2434 | +#: ../common/SongsPage.qml:224 ../common/SongsPage.qml:266 |
2435 | msgid "Genre" |
2436 | msgstr "" |
2437 | |
2438 | -#: ../MusicToolbar.qml:760 |
2439 | -msgid "Tap play to shuffle music" |
2440 | +#: ../MusicToolbar.qml:767 |
2441 | +msgid "Tap to shuffle music" |
2442 | msgstr "" |
2443 | |
2444 | #: ../MusicTracks.qml:35 |
2445 | @@ -259,16 +261,16 @@ |
2446 | msgstr "" |
2447 | |
2448 | #: ../common/AlbumsPage.qml:167 ../common/AlbumsPage.qml:360 |
2449 | -#: ../common/SongsPage.qml:153 |
2450 | +#: ../common/SongsPage.qml:218 |
2451 | msgid "Play all" |
2452 | msgstr "" |
2453 | |
2454 | #: ../common/AlbumsPage.qml:211 ../common/AlbumsPage.qml:400 |
2455 | -#: ../common/SongsPage.qml:200 ../music-app.qml:888 |
2456 | +#: ../music-app.qml:894 |
2457 | msgid "Add to queue" |
2458 | msgstr "" |
2459 | |
2460 | -#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:902 |
2461 | +#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:908 |
2462 | msgid "Add to playlist" |
2463 | msgstr "" |
2464 | |
2465 | @@ -294,6 +296,14 @@ |
2466 | msgid "Loading..." |
2467 | msgstr "" |
2468 | |
2469 | +#: ../common/SongsPage.qml:160 |
2470 | +msgid "Shuffle" |
2471 | +msgstr "" |
2472 | + |
2473 | +#: ../common/SongsPage.qml:197 |
2474 | +msgid "Queue all" |
2475 | +msgstr "" |
2476 | + |
2477 | #: ../common/SwipeDelete.qml:52 ../common/SwipeDelete.qml:88 |
2478 | msgid "Clear" |
2479 | msgstr "" |
2480 | @@ -306,127 +316,127 @@ |
2481 | msgid "Unknown Artist" |
2482 | msgstr "" |
2483 | |
2484 | -#: ../music-app.qml:142 |
2485 | +#: ../music-app.qml:141 |
2486 | msgid "Search Track" |
2487 | msgstr "" |
2488 | |
2489 | +#: ../music-app.qml:153 |
2490 | +msgid "Next" |
2491 | +msgstr "" |
2492 | + |
2493 | #: ../music-app.qml:154 |
2494 | -msgid "Next" |
2495 | -msgstr "" |
2496 | - |
2497 | -#: ../music-app.qml:155 |
2498 | msgid "Next Track" |
2499 | msgstr "" |
2500 | |
2501 | -#: ../music-app.qml:161 |
2502 | +#: ../music-app.qml:160 |
2503 | msgid "Pause" |
2504 | msgstr "" |
2505 | |
2506 | -#: ../music-app.qml:161 |
2507 | +#: ../music-app.qml:160 |
2508 | msgid "Play" |
2509 | msgstr "" |
2510 | |
2511 | -#: ../music-app.qml:163 |
2512 | +#: ../music-app.qml:162 |
2513 | msgid "Pause Playback" |
2514 | msgstr "" |
2515 | |
2516 | -#: ../music-app.qml:163 |
2517 | +#: ../music-app.qml:162 |
2518 | msgid "Continue or start playback" |
2519 | msgstr "" |
2520 | |
2521 | +#: ../music-app.qml:167 |
2522 | +msgid "Back" |
2523 | +msgstr "" |
2524 | + |
2525 | #: ../music-app.qml:168 |
2526 | -msgid "Back" |
2527 | -msgstr "" |
2528 | - |
2529 | -#: ../music-app.qml:169 |
2530 | msgid "Go back to last page" |
2531 | msgstr "" |
2532 | |
2533 | +#: ../music-app.qml:176 |
2534 | +msgid "Previous" |
2535 | +msgstr "" |
2536 | + |
2537 | #: ../music-app.qml:177 |
2538 | -msgid "Previous" |
2539 | -msgstr "" |
2540 | - |
2541 | -#: ../music-app.qml:178 |
2542 | msgid "Previous Track" |
2543 | msgstr "" |
2544 | |
2545 | +#: ../music-app.qml:182 |
2546 | +msgid "Stop" |
2547 | +msgstr "" |
2548 | + |
2549 | #: ../music-app.qml:183 |
2550 | -msgid "Stop" |
2551 | -msgstr "" |
2552 | - |
2553 | -#: ../music-app.qml:184 |
2554 | msgid "Stop Playback" |
2555 | msgstr "" |
2556 | |
2557 | -#: ../music-app.qml:192 |
2558 | +#: ../music-app.qml:191 |
2559 | msgid "Music Settings" |
2560 | msgstr "" |
2561 | |
2562 | #. TRANSLATORS: This string represents that the target destination filepath does not start with ~/Music/Imported/ |
2563 | -#: ../music-app.qml:338 |
2564 | +#: ../music-app.qml:337 |
2565 | msgid "Filepath must start with" |
2566 | msgstr "" |
2567 | |
2568 | #. TRANSLATORS: This string represents that a blank filepath destination has been used |
2569 | -#: ../music-app.qml:364 |
2570 | +#: ../music-app.qml:363 |
2571 | msgid "Filepath must be a file" |
2572 | msgstr "" |
2573 | |
2574 | #. TRANSLATORS: This string represents that there was failure moving the file to the target destination |
2575 | -#: ../music-app.qml:370 |
2576 | +#: ../music-app.qml:369 |
2577 | msgid "Failed to move file" |
2578 | msgstr "" |
2579 | |
2580 | -#: ../music-app.qml:447 |
2581 | +#: ../music-app.qml:446 |
2582 | msgid "Waiting for file(s)..." |
2583 | msgstr "" |
2584 | |
2585 | -#: ../music-app.qml:466 |
2586 | +#: ../music-app.qml:465 |
2587 | msgid "OK" |
2588 | msgstr "" |
2589 | |
2590 | -#: ../music-app.qml:479 |
2591 | +#: ../music-app.qml:478 |
2592 | msgid "Imported file not found" |
2593 | msgstr "" |
2594 | |
2595 | -#: ../music-app.qml:483 |
2596 | +#: ../music-app.qml:482 |
2597 | msgid "Wait" |
2598 | msgstr "" |
2599 | |
2600 | #. 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) |
2601 | +#: ../music-app.qml:503 |
2602 | +msgid "songs played today" |
2603 | +msgstr "" |
2604 | + |
2605 | #: ../music-app.qml:504 |
2606 | -msgid "songs played today" |
2607 | -msgstr "" |
2608 | - |
2609 | -#: ../music-app.qml:505 |
2610 | msgid "No songs played today" |
2611 | msgstr "" |
2612 | |
2613 | -#: ../music-app.qml:613 |
2614 | +#: ../music-app.qml:612 |
2615 | msgid "Debug: " |
2616 | msgstr "" |
2617 | |
2618 | -#: ../music-app.qml:925 |
2619 | +#: ../music-app.qml:931 |
2620 | msgid "New Playlist" |
2621 | msgstr "" |
2622 | |
2623 | -#: ../music-app.qml:926 |
2624 | +#: ../music-app.qml:932 |
2625 | msgid "Name your playlist." |
2626 | msgstr "" |
2627 | |
2628 | -#: ../music-app.qml:930 |
2629 | +#: ../music-app.qml:936 |
2630 | msgid "Name" |
2631 | msgstr "" |
2632 | |
2633 | -#: ../music-app.qml:940 |
2634 | +#: ../music-app.qml:946 |
2635 | msgid "Create" |
2636 | msgstr "" |
2637 | |
2638 | -#: ../music-app.qml:1176 |
2639 | +#: ../music-app.qml:1182 |
2640 | msgid "No music found" |
2641 | msgstr "" |
2642 | |
2643 | -#: ../music-app.qml:1183 |
2644 | +#: ../music-app.qml:1189 |
2645 | msgid "Please import music" |
2646 | msgstr "" |
2647 | |
2648 | |
2649 | === modified file 'po/pt_BR.po' |
2650 | --- po/pt_BR.po 2014-10-01 06:25:24 +0000 |
2651 | +++ po/pt_BR.po 2014-10-06 02:21:13 +0000 |
2652 | @@ -1,441 +1,459 @@ |
2653 | # Brazilian Portuguese translation for music-app |
2654 | -# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 |
2655 | +# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 |
2656 | # This file is distributed under the same license as the music-app package. |
2657 | -# FIRST AUTHOR <EMAIL@ADDRESS>, 2013. |
2658 | +# FIRST AUTHOR <EMAIL@ADDRESS>, 2014. |
2659 | # |
2660 | msgid "" |
2661 | msgstr "" |
2662 | "Project-Id-Version: music-app\n" |
2663 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
2664 | +<<<<<<< TREE |
2665 | "POT-Creation-Date: 2014-09-23 13:43+0100\n" |
2666 | "PO-Revision-Date: 2014-09-30 17:34+0000\n" |
2667 | "Last-Translator: Rafael Neri <Unknown>\n" |
2668 | +======= |
2669 | +"POT-Creation-Date: 2014-10-02 20:40-0500\n" |
2670 | +"PO-Revision-Date: 2014-09-30 18:07+0000\n" |
2671 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
2672 | +>>>>>>> MERGE-SOURCE |
2673 | "Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" |
2674 | "MIME-Version: 1.0\n" |
2675 | "Content-Type: text/plain; charset=UTF-8\n" |
2676 | "Content-Transfer-Encoding: 8bit\n" |
2677 | "Plural-Forms: nplurals=2; plural=n > 1;\n" |
2678 | +<<<<<<< TREE |
2679 | "X-Launchpad-Export-Date: 2014-10-01 06:25+0000\n" |
2680 | +======= |
2681 | +"X-Launchpad-Export-Date: 2014-10-05 07:28+0000\n" |
2682 | +>>>>>>> MERGE-SOURCE |
2683 | "X-Generator: Launchpad (build 17196)\n" |
2684 | |
2685 | #: ../LoginLastFM.qml:48 ../MusicSettings.qml:145 ../MusicSettings.qml:153 |
2686 | msgid "Last.fm" |
2687 | -msgstr "Last.fm" |
2688 | +msgstr "" |
2689 | |
2690 | #: ../LoginLastFM.qml:54 |
2691 | msgid "Login to be able to scrobble." |
2692 | -msgstr "Faça login para habilitar o scrobble." |
2693 | +msgstr "" |
2694 | |
2695 | #: ../LoginLastFM.qml:62 |
2696 | msgid "Username" |
2697 | -msgstr "Usuário" |
2698 | +msgstr "" |
2699 | |
2700 | #: ../LoginLastFM.qml:72 |
2701 | msgid "Password" |
2702 | -msgstr "Senha" |
2703 | +msgstr "" |
2704 | |
2705 | #: ../LoginLastFM.qml:94 |
2706 | msgid "Login" |
2707 | -msgstr "Login" |
2708 | +msgstr "" |
2709 | |
2710 | #: ../LoginLastFM.qml:101 |
2711 | msgid "Trying to login..." |
2712 | -msgstr "Tentando entrar..." |
2713 | +msgstr "" |
2714 | |
2715 | #: ../LoginLastFM.qml:115 |
2716 | msgid "Login Successful" |
2717 | -msgstr "Login realizado com sucesso" |
2718 | +msgstr "" |
2719 | |
2720 | #: ../LoginLastFM.qml:121 |
2721 | msgid "Login Failed" |
2722 | -msgstr "Falha no login" |
2723 | +msgstr "" |
2724 | |
2725 | #: ../LoginLastFM.qml:127 |
2726 | msgid "You forgot to set your username and/or password" |
2727 | -msgstr "Você esqueceu de definir seu usuário e/ou senha" |
2728 | +msgstr "" |
2729 | |
2730 | #: ../MusicAlbums.qml:35 ../MusicStart.qml:392 |
2731 | msgid "Albums" |
2732 | -msgstr "Álbuns" |
2733 | +msgstr "" |
2734 | |
2735 | #: ../MusicAlbums.qml:152 ../MusicStart.qml:200 ../MusicStart.qml:454 |
2736 | #: ../common/AlbumsPage.qml:264 |
2737 | msgid "Album" |
2738 | -msgstr "Álbum" |
2739 | +msgstr "" |
2740 | |
2741 | #: ../MusicArtists.qml:37 |
2742 | msgid "Artists" |
2743 | -msgstr "Artistas" |
2744 | +msgstr "" |
2745 | |
2746 | #: ../MusicArtists.qml:107 ../common/AlbumsPage.qml:112 |
2747 | #, qt-format |
2748 | msgid "%1 album" |
2749 | msgid_plural "%1 albums" |
2750 | -msgstr[0] "%1 álbum" |
2751 | -msgstr[1] "%1 álbuns" |
2752 | +msgstr[0] "" |
2753 | +msgstr[1] "" |
2754 | |
2755 | #: ../MusicArtists.qml:113 ../MusicPlaylists.qml:180 ../MusicStart.qml:371 |
2756 | #: ../MusicaddtoPlaylist.qml:106 ../common/AlbumsPage.qml:331 |
2757 | -#: ../common/SongsPage.qml:123 ../common/SongsPage.qml:124 |
2758 | +#: ../common/SongsPage.qml:138 ../common/SongsPage.qml:139 |
2759 | #, qt-format |
2760 | msgid "%1 song" |
2761 | msgid_plural "%1 songs" |
2762 | -msgstr[0] "%1 música" |
2763 | -msgstr[1] "%1 músicas" |
2764 | +msgstr[0] "" |
2765 | +msgstr[1] "" |
2766 | |
2767 | #: ../MusicArtists.qml:123 |
2768 | msgid "Artist" |
2769 | -msgstr "Artista" |
2770 | +msgstr "" |
2771 | |
2772 | #: ../MusicNowPlaying.qml:33 |
2773 | msgid "Now Playing" |
2774 | -msgstr "Reproduzindo agora" |
2775 | +msgstr "" |
2776 | |
2777 | #. TRANSLATORS: this is the name of the playlists page shown in the tab header. |
2778 | #. Remember to keep the translation short to fit the screen width |
2779 | #: ../MusicPlaylists.qml:38 |
2780 | msgid "Playlists" |
2781 | -msgstr "Listas de reprodução" |
2782 | +msgstr "" |
2783 | |
2784 | #: ../MusicPlaylists.qml:48 ../MusicaddtoPlaylist.qml:48 |
2785 | msgid "New playlist" |
2786 | -msgstr "Nova lista de reprodução" |
2787 | +msgstr "" |
2788 | |
2789 | #. TRANSLATORS: this is a title of a dialog with a prompt to rename a playlist |
2790 | #: ../MusicPlaylists.qml:64 |
2791 | msgid "Change name" |
2792 | -msgstr "Alterar nome" |
2793 | +msgstr "" |
2794 | |
2795 | #: ../MusicPlaylists.qml:65 |
2796 | msgid "Enter the new name of the playlist." |
2797 | -msgstr "Inserir o novo nome da lista de reprodução." |
2798 | +msgstr "" |
2799 | |
2800 | #: ../MusicPlaylists.qml:78 |
2801 | msgid "Change" |
2802 | -msgstr "Alterar" |
2803 | +msgstr "" |
2804 | |
2805 | -#: ../MusicPlaylists.qml:96 ../music-app.qml:956 |
2806 | +#: ../MusicPlaylists.qml:96 ../music-app.qml:962 |
2807 | msgid "Playlist already exists" |
2808 | -msgstr "Lista de reprodução já existe" |
2809 | +msgstr "" |
2810 | |
2811 | -#: ../MusicPlaylists.qml:100 ../music-app.qml:961 |
2812 | +#: ../MusicPlaylists.qml:100 ../music-app.qml:967 |
2813 | msgid "Please type in a name." |
2814 | -msgstr "Por favor, informe um nome." |
2815 | +msgstr "" |
2816 | |
2817 | -#: ../MusicPlaylists.qml:105 ../music-app.qml:493 ../music-app.qml:967 |
2818 | +#: ../MusicPlaylists.qml:105 ../music-app.qml:492 ../music-app.qml:973 |
2819 | msgid "Cancel" |
2820 | -msgstr "Cancelar" |
2821 | +msgstr "" |
2822 | |
2823 | #: ../MusicPlaylists.qml:159 ../MusicPlaylists.qml:163 ../MusicStart.qml:118 |
2824 | -#: ../MusicStart.qml:200 ../common/SongsPage.qml:166 |
2825 | -#: ../common/SongsPage.qml:224 ../common/SongsPage.qml:226 |
2826 | -#: ../common/SongsPage.qml:244 |
2827 | +#: ../MusicStart.qml:200 ../common/SongsPage.qml:114 |
2828 | +#: ../common/SongsPage.qml:171 ../common/SongsPage.qml:228 |
2829 | +#: ../common/SongsPage.qml:250 ../common/SongsPage.qml:252 |
2830 | +#: ../common/SongsPage.qml:270 |
2831 | msgid "Playlist" |
2832 | -msgstr "Lista de reprodução" |
2833 | +msgstr "" |
2834 | |
2835 | -#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:519 |
2836 | -#: ../music-app.qml:93 ../music-app.qml:141 ../music-app.qml:147 |
2837 | +#: ../MusicSearch.qml:44 ../MusicSearch.qml:75 ../MusicToolbar.qml:522 |
2838 | +#: ../music-app.qml:92 ../music-app.qml:140 ../music-app.qml:146 |
2839 | msgid "Search" |
2840 | -msgstr "Pesquisar" |
2841 | +msgstr "" |
2842 | |
2843 | -#: ../MusicSettings.qml:30 ../music-app.qml:191 |
2844 | +#: ../MusicSettings.qml:30 ../music-app.qml:190 |
2845 | msgid "Settings" |
2846 | -msgstr "Configurações" |
2847 | +msgstr "" |
2848 | |
2849 | #: ../MusicSettings.qml:81 |
2850 | msgid "Equaliser" |
2851 | -msgstr "Equalizador" |
2852 | +msgstr "" |
2853 | |
2854 | #: ../MusicSettings.qml:82 |
2855 | msgid "Default" |
2856 | -msgstr "Padrão" |
2857 | +msgstr "" |
2858 | |
2859 | #: ../MusicSettings.qml:83 |
2860 | msgid "Acoustic" |
2861 | -msgstr "Acústico" |
2862 | +msgstr "" |
2863 | |
2864 | #: ../MusicSettings.qml:84 |
2865 | msgid "Classical" |
2866 | -msgstr "Clássica" |
2867 | +msgstr "" |
2868 | |
2869 | #: ../MusicSettings.qml:85 |
2870 | msgid "Electronic" |
2871 | -msgstr "Eletrônica" |
2872 | +msgstr "" |
2873 | |
2874 | #: ../MusicSettings.qml:86 |
2875 | msgid "Flat" |
2876 | -msgstr "Flat" |
2877 | +msgstr "" |
2878 | |
2879 | #: ../MusicSettings.qml:87 |
2880 | msgid "Hip Hop" |
2881 | -msgstr "Hip Hop" |
2882 | +msgstr "" |
2883 | |
2884 | #: ../MusicSettings.qml:88 |
2885 | msgid "Jazz" |
2886 | -msgstr "Jazz" |
2887 | +msgstr "" |
2888 | |
2889 | #: ../MusicSettings.qml:89 |
2890 | msgid "Metal" |
2891 | -msgstr "Metal" |
2892 | +msgstr "" |
2893 | |
2894 | #: ../MusicSettings.qml:90 |
2895 | msgid "Pop" |
2896 | -msgstr "Pop" |
2897 | +msgstr "" |
2898 | |
2899 | #: ../MusicSettings.qml:91 |
2900 | msgid "Rock" |
2901 | -msgstr "Rock" |
2902 | +msgstr "" |
2903 | |
2904 | #: ../MusicSettings.qml:92 |
2905 | msgid "Custom" |
2906 | -msgstr "Personalizado" |
2907 | +msgstr "" |
2908 | |
2909 | #: ../MusicSettings.qml:112 |
2910 | msgid "" |
2911 | "Snap to current song \n" |
2912 | "when opening toolbar" |
2913 | msgstr "" |
2914 | -"Ajustar a música atual \n" |
2915 | -"quando abrir a barra de ferramentas" |
2916 | |
2917 | #: ../MusicSettings.qml:132 |
2918 | msgid "Accounts" |
2919 | -msgstr "Contas" |
2920 | +msgstr "" |
2921 | |
2922 | #: ../MusicSettings.qml:146 |
2923 | msgid "Login to scrobble and import playlists" |
2924 | -msgstr "Fazer login no scrobble e importar as listas de reprodução" |
2925 | +msgstr "" |
2926 | |
2927 | #: ../MusicSettings.qml:169 |
2928 | msgid "Music Streaming" |
2929 | -msgstr "Streaming de música" |
2930 | +msgstr "" |
2931 | |
2932 | #: ../MusicSettings.qml:179 |
2933 | msgid "Ubuntu One" |
2934 | -msgstr "Ubuntu One" |
2935 | +msgstr "" |
2936 | |
2937 | #: ../MusicSettings.qml:180 |
2938 | msgid "Sign in to stream your cloud music" |
2939 | -msgstr "Fazer login para transmitir suas músicas armazenadas em nuvem" |
2940 | +msgstr "" |
2941 | |
2942 | #: ../MusicSettings.qml:196 |
2943 | msgid "Stream only on Wi-Fi" |
2944 | -msgstr "Transmitir apenas através de Wi-Fi" |
2945 | +msgstr "" |
2946 | |
2947 | #: ../MusicSettings.qml:230 |
2948 | msgid "Clean everything!" |
2949 | -msgstr "Limpar tudo!" |
2950 | +msgstr "" |
2951 | |
2952 | -#: ../MusicStart.qml:35 ../music-app.qml:589 ../music-app.qml:1150 |
2953 | +#: ../MusicStart.qml:35 ../music-app.qml:588 ../music-app.qml:1156 |
2954 | #: com.ubuntu.music_music.desktop.in.in.h:1 |
2955 | msgid "Music" |
2956 | -msgstr "Música" |
2957 | +msgstr "" |
2958 | |
2959 | #: ../MusicStart.qml:75 |
2960 | msgid "Recent" |
2961 | -msgstr "Recente" |
2962 | +msgstr "" |
2963 | |
2964 | #: ../MusicStart.qml:103 |
2965 | msgid "Clear History" |
2966 | -msgstr "Limpar histórico" |
2967 | +msgstr "" |
2968 | |
2969 | #: ../MusicStart.qml:227 |
2970 | msgid "Genres" |
2971 | -msgstr "Gêneros" |
2972 | +msgstr "" |
2973 | |
2974 | -#: ../MusicStart.qml:316 ../MusicStart.qml:318 ../common/SongsPage.qml:123 |
2975 | -#: ../common/SongsPage.qml:162 ../common/SongsPage.qml:240 |
2976 | +#: ../MusicStart.qml:316 ../MusicStart.qml:318 ../common/SongsPage.qml:115 |
2977 | +#: ../common/SongsPage.qml:138 ../common/SongsPage.qml:167 |
2978 | +#: ../common/SongsPage.qml:224 ../common/SongsPage.qml:266 |
2979 | msgid "Genre" |
2980 | -msgstr "Gênero" |
2981 | +msgstr "" |
2982 | |
2983 | -#: ../MusicToolbar.qml:760 |
2984 | -msgid "Tap play to shuffle music" |
2985 | -msgstr "Toque em reproduzir para embaralhar músicas" |
2986 | +#: ../MusicToolbar.qml:767 |
2987 | +msgid "Tap to shuffle music" |
2988 | +msgstr "" |
2989 | |
2990 | #: ../MusicTracks.qml:35 |
2991 | msgid "Songs" |
2992 | -msgstr "Músicas" |
2993 | +msgstr "" |
2994 | |
2995 | #: ../MusicaddtoPlaylist.qml:41 |
2996 | msgid "Select playlist" |
2997 | -msgstr "Selecione uma lista de reprodução" |
2998 | +msgstr "" |
2999 | |
3000 | #: ../common/AlbumsPage.qml:167 ../common/AlbumsPage.qml:360 |
3001 | -#: ../common/SongsPage.qml:153 |
3002 | +#: ../common/SongsPage.qml:218 |
3003 | msgid "Play all" |
3004 | -msgstr "Tocar tudo" |
3005 | +msgstr "" |
3006 | |
3007 | #: ../common/AlbumsPage.qml:211 ../common/AlbumsPage.qml:400 |
3008 | -#: ../common/SongsPage.qml:200 ../music-app.qml:888 |
3009 | +#: ../music-app.qml:894 |
3010 | msgid "Add to queue" |
3011 | -msgstr "Adicionar à fila" |
3012 | +msgstr "" |
3013 | |
3014 | -#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:902 |
3015 | +#: ../common/ListItemActions/AddToPlaylist.qml:25 ../music-app.qml:908 |
3016 | msgid "Add to playlist" |
3017 | -msgstr "Adicionar à lista de reprodução" |
3018 | +msgstr "" |
3019 | |
3020 | #: ../common/ListItemActions/AddToQueue.qml:25 |
3021 | msgid "Add to Queue" |
3022 | -msgstr "Adicionar à fila de reprodução" |
3023 | +msgstr "" |
3024 | |
3025 | #. TRANSLATORS: this refers to deleting a playlist |
3026 | #: ../common/ListItemActions/DeletePlaylist.qml:26 |
3027 | msgid "Delete" |
3028 | -msgstr "Apagar" |
3029 | +msgstr "" |
3030 | |
3031 | #. TRANSLATORS: this refers to editing a playlist |
3032 | #: ../common/ListItemActions/EditPlaylist.qml:26 |
3033 | msgid "Edit" |
3034 | -msgstr "Editar" |
3035 | +msgstr "" |
3036 | |
3037 | #: ../common/ListItemActions/Remove.qml:27 |
3038 | msgid "Remove" |
3039 | -msgstr "Remover" |
3040 | +msgstr "" |
3041 | |
3042 | #: ../common/LoadingSpinnerComponent.qml:47 |
3043 | msgid "Loading..." |
3044 | -msgstr "Carregando..." |
3045 | +msgstr "" |
3046 | + |
3047 | +#: ../common/SongsPage.qml:160 |
3048 | +msgid "Shuffle" |
3049 | +msgstr "" |
3050 | + |
3051 | +#: ../common/SongsPage.qml:197 |
3052 | +msgid "Queue all" |
3053 | +msgstr "" |
3054 | |
3055 | #: ../common/SwipeDelete.qml:52 ../common/SwipeDelete.qml:88 |
3056 | msgid "Clear" |
3057 | -msgstr "Limpar" |
3058 | +msgstr "" |
3059 | |
3060 | #: ../meta-database.js:90 ../meta-database.js:92 |
3061 | msgid "Unknown Album" |
3062 | -msgstr "Álbum desconhecido" |
3063 | +msgstr "" |
3064 | |
3065 | #: ../meta-database.js:91 |
3066 | msgid "Unknown Artist" |
3067 | -msgstr "Artista desconhecido" |
3068 | +msgstr "" |
3069 | |
3070 | -#: ../music-app.qml:142 |
3071 | +#: ../music-app.qml:141 |
3072 | msgid "Search Track" |
3073 | -msgstr "Pesquisar faixa" |
3074 | +msgstr "" |
3075 | + |
3076 | +#: ../music-app.qml:153 |
3077 | +msgid "Next" |
3078 | +msgstr "" |
3079 | |
3080 | #: ../music-app.qml:154 |
3081 | -msgid "Next" |
3082 | -msgstr "Próximo" |
3083 | - |
3084 | -#: ../music-app.qml:155 |
3085 | msgid "Next Track" |
3086 | -msgstr "Próxima faixa" |
3087 | +msgstr "" |
3088 | |
3089 | -#: ../music-app.qml:161 |
3090 | +#: ../music-app.qml:160 |
3091 | msgid "Pause" |
3092 | -msgstr "Pausar" |
3093 | +msgstr "" |
3094 | |
3095 | -#: ../music-app.qml:161 |
3096 | +#: ../music-app.qml:160 |
3097 | msgid "Play" |
3098 | -msgstr "Tocar" |
3099 | +msgstr "" |
3100 | |
3101 | -#: ../music-app.qml:163 |
3102 | +#: ../music-app.qml:162 |
3103 | msgid "Pause Playback" |
3104 | -msgstr "Pausar Reprodução" |
3105 | +msgstr "" |
3106 | |
3107 | -#: ../music-app.qml:163 |
3108 | +#: ../music-app.qml:162 |
3109 | msgid "Continue or start playback" |
3110 | -msgstr "Continuar ou iniciar reprodução" |
3111 | +msgstr "" |
3112 | + |
3113 | +#: ../music-app.qml:167 |
3114 | +msgid "Back" |
3115 | +msgstr "" |
3116 | |
3117 | #: ../music-app.qml:168 |
3118 | -msgid "Back" |
3119 | -msgstr "Voltar" |
3120 | - |
3121 | -#: ../music-app.qml:169 |
3122 | msgid "Go back to last page" |
3123 | -msgstr "Voltar para a última página" |
3124 | +msgstr "" |
3125 | + |
3126 | +#: ../music-app.qml:176 |
3127 | +msgid "Previous" |
3128 | +msgstr "" |
3129 | |
3130 | #: ../music-app.qml:177 |
3131 | -msgid "Previous" |
3132 | -msgstr "Anterior" |
3133 | - |
3134 | -#: ../music-app.qml:178 |
3135 | msgid "Previous Track" |
3136 | -msgstr "Faixa anterior" |
3137 | +msgstr "" |
3138 | + |
3139 | +#: ../music-app.qml:182 |
3140 | +msgid "Stop" |
3141 | +msgstr "" |
3142 | |
3143 | #: ../music-app.qml:183 |
3144 | -msgid "Stop" |
3145 | -msgstr "Parar" |
3146 | - |
3147 | -#: ../music-app.qml:184 |
3148 | msgid "Stop Playback" |
3149 | -msgstr "Parar reprodução" |
3150 | +msgstr "" |
3151 | |
3152 | -#: ../music-app.qml:192 |
3153 | +#: ../music-app.qml:191 |
3154 | msgid "Music Settings" |
3155 | -msgstr "Configurações de Música" |
3156 | +msgstr "" |
3157 | |
3158 | #. TRANSLATORS: This string represents that the target destination filepath does not start with ~/Music/Imported/ |
3159 | -#: ../music-app.qml:338 |
3160 | +#: ../music-app.qml:337 |
3161 | msgid "Filepath must start with" |
3162 | msgstr "O caminho do arquivo deve começar com" |
3163 | |
3164 | #. TRANSLATORS: This string represents that a blank filepath destination has been used |
3165 | -#: ../music-app.qml:364 |
3166 | +#: ../music-app.qml:363 |
3167 | msgid "Filepath must be a file" |
3168 | -msgstr "O caminho deve ser de um arquivo" |
3169 | +msgstr "" |
3170 | |
3171 | #. TRANSLATORS: This string represents that there was failure moving the file to the target destination |
3172 | -#: ../music-app.qml:370 |
3173 | +#: ../music-app.qml:369 |
3174 | msgid "Failed to move file" |
3175 | -msgstr "Falhou ao mover arquivo" |
3176 | +msgstr "" |
3177 | |
3178 | -#: ../music-app.qml:447 |
3179 | +#: ../music-app.qml:446 |
3180 | msgid "Waiting for file(s)..." |
3181 | msgstr "Aguardando pelo(s) arquivo(s)" |
3182 | |
3183 | -#: ../music-app.qml:466 |
3184 | +#: ../music-app.qml:465 |
3185 | msgid "OK" |
3186 | -msgstr "OK" |
3187 | +msgstr "" |
3188 | |
3189 | -#: ../music-app.qml:479 |
3190 | +#: ../music-app.qml:478 |
3191 | msgid "Imported file not found" |
3192 | -msgstr "O arquivo importado não foi encontrado" |
3193 | +msgstr "" |
3194 | |
3195 | -#: ../music-app.qml:483 |
3196 | +#: ../music-app.qml:482 |
3197 | msgid "Wait" |
3198 | -msgstr "Aguardando" |
3199 | +msgstr "" |
3200 | |
3201 | #. 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) |
3202 | +#: ../music-app.qml:503 |
3203 | +msgid "songs played today" |
3204 | +msgstr "" |
3205 | + |
3206 | #: ../music-app.qml:504 |
3207 | -msgid "songs played today" |
3208 | -msgstr "músicas tocadas hoje" |
3209 | - |
3210 | -#: ../music-app.qml:505 |
3211 | msgid "No songs played today" |
3212 | -msgstr "Nenhuma música tocada hoje" |
3213 | +msgstr "" |
3214 | |
3215 | -#: ../music-app.qml:613 |
3216 | +#: ../music-app.qml:612 |
3217 | msgid "Debug: " |
3218 | -msgstr "Debug: " |
3219 | +msgstr "" |
3220 | |
3221 | -#: ../music-app.qml:925 |
3222 | +#: ../music-app.qml:931 |
3223 | msgid "New Playlist" |
3224 | -msgstr "Nova lista de reprodução" |
3225 | +msgstr "" |
3226 | |
3227 | -#: ../music-app.qml:926 |
3228 | +#: ../music-app.qml:932 |
3229 | msgid "Name your playlist." |
3230 | -msgstr "Nomear sua lista de reprodução." |
3231 | +msgstr "" |
3232 | |
3233 | -#: ../music-app.qml:930 |
3234 | +#: ../music-app.qml:936 |
3235 | msgid "Name" |
3236 | -msgstr "Nome" |
3237 | +msgstr "" |
3238 | |
3239 | -#: ../music-app.qml:940 |
3240 | +#: ../music-app.qml:946 |
3241 | msgid "Create" |
3242 | -msgstr "Criar" |
3243 | +msgstr "" |
3244 | |
3245 | -#: ../music-app.qml:1176 |
3246 | +#: ../music-app.qml:1182 |
3247 | msgid "No music found" |
3248 | -msgstr "Nenhuma música encontrada" |
3249 | +msgstr "" |
3250 | |
3251 | -#: ../music-app.qml:1183 |
3252 | +#: ../music-app.qml:1189 |
3253 | msgid "Please import music" |
3254 | -msgstr "Por favor, importar músicas" |
3255 | +msgstr "" |
3256 | |
3257 | #: com.ubuntu.music_music.desktop.in.in.h:2 |
3258 | msgid "A music application for Ubuntu" |
3259 | -msgstr "Aplicativo de musica para o Ubuntu" |
3260 | +msgstr "" |
3261 | |
3262 | #: com.ubuntu.music_music.desktop.in.in.h:3 |
3263 | msgid "music;songs;play;tracks;player;tunes;" |
3264 | -msgstr "música;músicas;tocar;faixas;player;tons;" |
3265 | +msgstr "" |
3266 | |
3267 | === modified file 'tests/autopilot/music_app/__init__.py' |
3268 | --- tests/autopilot/music_app/__init__.py 2014-09-25 17:58:55 +0000 |
3269 | +++ tests/autopilot/music_app/__init__.py 2014-10-06 02:21:13 +0000 |
3270 | @@ -21,17 +21,6 @@ |
3271 | return func_wrapper |
3272 | |
3273 | |
3274 | -def ensure_toolbar_visible(func): |
3275 | - """Wrapper which ensures the toolbar is shown before clicking""" |
3276 | - def func_wrapper(self, *args, **kwargs): |
3277 | - if not self.opened: |
3278 | - self.show() |
3279 | - |
3280 | - return func(self, *args, **kwargs) |
3281 | - |
3282 | - return func_wrapper |
3283 | - |
3284 | - |
3285 | class MusicApp(object): |
3286 | """Autopilot helper object for the Music application.""" |
3287 | |
3288 | @@ -279,38 +268,29 @@ |
3289 | root = self.get_root_instance() |
3290 | self.player = root.select_single(Player, objectName="player") |
3291 | |
3292 | - @ensure_toolbar_visible |
3293 | @click_object |
3294 | def click_forward_button(self): |
3295 | return self.wait_select_single("*", objectName="forwardShape") |
3296 | |
3297 | - @ensure_toolbar_visible |
3298 | @click_object |
3299 | def click_play_button(self): |
3300 | - if self.currentMode == "full": |
3301 | - return self.wait_select_single("*", objectName="playShape") |
3302 | - else: |
3303 | - return self.wait_select_single("*", objectName="smallPlayShape") |
3304 | + return self.wait_select_single("*", objectName="playShape") |
3305 | |
3306 | - @ensure_toolbar_visible |
3307 | @click_object |
3308 | def click_previous_button(self): |
3309 | return self.wait_select_single("*", objectName="previousShape") |
3310 | |
3311 | - @ensure_toolbar_visible |
3312 | @click_object |
3313 | def click_repeat_button(self): |
3314 | return self.wait_select_single("*", objectName="repeatShape") |
3315 | |
3316 | - @ensure_toolbar_visible |
3317 | @click_object |
3318 | def click_shuffle_button(self): |
3319 | return self.wait_select_single("*", objectName="shuffleShape") |
3320 | |
3321 | - @ensure_toolbar_visible |
3322 | def seek_to(self, percentage): |
3323 | progress_bar = self.wait_select_single( |
3324 | - "*", objectName="progressBarShape") |
3325 | + "*", objectName="progressSliderShape") |
3326 | |
3327 | x1, y1, width, height = progress_bar.globalRect |
3328 | y1 += height // 2 |
3329 | @@ -319,29 +299,18 @@ |
3330 | |
3331 | self.pointing_device.drag(x1, y1, x2, y1) |
3332 | |
3333 | - @ensure_toolbar_visible |
3334 | def set_repeat(self, state): |
3335 | if self.player.repeat != state: |
3336 | self.click_repeat_button() |
3337 | |
3338 | self.player.repeat.wait_for(state) |
3339 | |
3340 | - @ensure_toolbar_visible |
3341 | def set_shuffle(self, state): |
3342 | if self.player.shuffle != state: |
3343 | self.click_shuffle_button() |
3344 | |
3345 | self.player.shuffle.wait_for(state) |
3346 | |
3347 | - def show(self): |
3348 | - self.pointing_device.move_to_object(self) |
3349 | - |
3350 | - x1, y1 = self.pointing_device.position() |
3351 | - |
3352 | - y1 -= (self.height / 2) + 1 # get position at top of toolbar |
3353 | - |
3354 | - self.pointing_device.drag(x1, y1, x1, y1 - self.fullHeight) |
3355 | - |
3356 | |
3357 | class ListItemWithActions(UbuntuUIToolkitCustomProxyObjectBase): |
3358 | @click_object |