Merge lp:~vthompson/music-app/album-sheet into lp:music-app/trusty
- album-sheet
- Merge into trusty
Status: | Merged |
---|---|
Approved by: | Daniel Holm |
Approved revision: | 112 |
Merged at revision: | 165 |
Proposed branch: | lp:~vthompson/music-app/album-sheet |
Merge into: | lp:music-app/trusty |
Diff against target: |
643 lines (+294/-302) 3 files modified
MusicAlbums.qml (+245/-279) common/BlurredBackground.qml (+48/-0) music-app.qml (+1/-23) |
To merge this branch: | bzr merge lp:~vthompson/music-app/album-sheet |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Daniel Holm | Approve | ||
Review via email: mp+189451@code.launchpad.net |
Commit message
* Make Album, Artist, and Playlist secondary content a sheet.
* Fix bottom align of the Albums tab so if many albums are shown, they can anchor to the bottom of the controls
Description of the change
* Make Album, Artist, and Playlist secondary content a sheet.
* Fix bottom align of the Albums tab so if many albums are shown, they can anchor to the bottom of the controls
Daniel Holm (danielholm) wrote : | # |
Daniel Holm (danielholm) wrote : | # |
Never mind the other sheet stuff - I thought that they had release a new sheet option where you could move the buttons to the bottom, but I was wrong. Stick with it.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:109
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:110
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:110
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andrew Hayzen (ahayzen) wrote : | # |
I don't think these are needed anymore?
30 + Component.
31 + onPlayingTrackC
32 + }
144 + function updateHighlight
145 + {
146 + console.
147 + }
Victor Thompson (vthompson) wrote : | # |
Those aren't needed I'll axe them.
- 111. By Victor Thompson
-
Remove unused code
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:111
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 112. By Victor Thompson
-
Merge with trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:112
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel Holm (danielholm) wrote : | # |
I dont like how grey the bg is at start up - kind of looks like its not responding, but I'll approve this since the brnach does what is should and the bg can be discussed later. Now We should also use this sheet from the artist list, which only should list albums and not tracks.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) : | # |
Preview Diff
1 | === modified file 'MusicAlbums.qml' |
2 | --- MusicAlbums.qml 2013-10-03 22:23:55 +0000 |
3 | +++ MusicAlbums.qml 2013-10-09 00:23:35 +0000 |
4 | @@ -22,306 +22,272 @@ |
5 | import Ubuntu.Components.ListItems 0.1 as ListItem |
6 | import QtMultimedia 5.0 |
7 | import QtQuick.LocalStorage 2.0 |
8 | +import QtGraphicalEffects 1.0 |
9 | import "settings.js" as Settings |
10 | import "meta-database.js" as Library |
11 | import "playlists.js" as Playlists |
12 | - |
13 | -PageStack { |
14 | - id: pageStack |
15 | - anchors.fill: parent |
16 | +import "common" |
17 | + |
18 | +Page { |
19 | + id: mainpage |
20 | + title: i18n.tr("Albums") |
21 | + |
22 | + property string artist: "" |
23 | + property string album: "" |
24 | + property string songtitle: "" |
25 | + property string cover: "" |
26 | + property string length: "" |
27 | + property string file: "" |
28 | + property string year: "" |
29 | |
30 | MusicSettings { |
31 | id: musicSettings |
32 | } |
33 | |
34 | - Page { |
35 | - id: mainpage |
36 | - title: i18n.tr("Albums") |
37 | - Component.onCompleted: { |
38 | - pageStack.push(mainpage) |
39 | - } |
40 | - |
41 | - tools: ToolbarItems { |
42 | - // Settings dialog |
43 | - ToolbarButton { |
44 | - objectName: "settingsaction" |
45 | - iconSource: Qt.resolvedUrl("images/settings.png") |
46 | - text: i18n.tr("Settings") |
47 | - |
48 | - onTriggered: { |
49 | - console.debug('Debug: Show settings') |
50 | - PopupUtils.open(Qt.resolvedUrl("MusicSettings.qml"), mainView, |
51 | - { |
52 | - title: i18n.tr("Settings") |
53 | - } ) |
54 | - } |
55 | - } |
56 | - } |
57 | - |
58 | - GridView { |
59 | - id: albumlist |
60 | - width: parent.width |
61 | - anchors.top: parent.top |
62 | - anchors.bottom: parent.bottom |
63 | - cellHeight: units.gu(14) |
64 | - cellWidth: units.gu(14) |
65 | - model: albumModel.model |
66 | - delegate: albumDelegate |
67 | - |
68 | - Component { |
69 | - id: albumDelegate |
70 | - Item { |
71 | - id: albumItem |
72 | - height: units.gu(13) |
73 | - width: units.gu(13) |
74 | - anchors.margins: units.gu(1) |
75 | + tools: ToolbarItems { |
76 | + // Settings dialog |
77 | + ToolbarButton { |
78 | + objectName: "settingsaction" |
79 | + iconSource: Qt.resolvedUrl("images/settings.png") |
80 | + text: i18n.tr("Settings") |
81 | + |
82 | + onTriggered: { |
83 | + console.debug('Debug: Show settings') |
84 | + PopupUtils.open(Qt.resolvedUrl("MusicSettings.qml"), mainView, |
85 | + { |
86 | + title: i18n.tr("Settings") |
87 | + } ) |
88 | + } |
89 | + } |
90 | + } |
91 | + |
92 | + GridView { |
93 | + id: albumlist |
94 | + width: parent.width |
95 | + anchors.top: parent.top |
96 | + anchors.bottom: parent.bottom |
97 | + cellHeight: units.gu(14) |
98 | + cellWidth: units.gu(14) |
99 | + model: albumModel.model |
100 | + delegate: albumDelegate |
101 | + |
102 | + Component { |
103 | + id: albumDelegate |
104 | + Item { |
105 | + id: albumItem |
106 | + height: units.gu(13) |
107 | + width: units.gu(13) |
108 | + anchors.margins: units.gu(1) |
109 | + UbuntuShape { |
110 | + id: albumShape |
111 | + height: albumItem.width |
112 | + width: albumItem.width |
113 | + image: Image { |
114 | + id: icon |
115 | + fillMode: Image.Stretch |
116 | + property string artist: model.artist |
117 | + property string album: model.album |
118 | + property string title: model.title |
119 | + property string cover: model.cover |
120 | + property string length: model.length |
121 | + property string file: model.file |
122 | + property string year: model.year |
123 | + source: cover !== "" ? cover : "images/cover_default.png" |
124 | + } |
125 | + UbuntuShape { // Background so can see text in current state |
126 | + id: albumBg |
127 | + anchors.bottom: parent.bottom |
128 | + color: styleMusic.common.black |
129 | + height: units.gu(4) |
130 | + opacity: .75 |
131 | + width: parent.width |
132 | + } |
133 | + Label { |
134 | + id: albumLabel |
135 | + anchors.bottom: albumArtist.top |
136 | + horizontalAlignment: Text.AlignHCenter |
137 | + color: styleMusic.nowPlaying.labelSecondaryColor |
138 | + elide: Text.ElideRight |
139 | + text: album |
140 | + fontSize: "small" |
141 | + width: parent.width |
142 | + } |
143 | + Label { |
144 | + id: albumArtist |
145 | + anchors.bottom: parent.bottom |
146 | + horizontalAlignment: Text.AlignHCenter |
147 | + color: styleMusic.nowPlaying.labelSecondaryColor |
148 | + elide: Text.ElideRight |
149 | + text: artist |
150 | + fontSize: "small" |
151 | + width: parent.width |
152 | + } |
153 | + |
154 | + } |
155 | + |
156 | + MouseArea { |
157 | + anchors.fill: parent |
158 | + onDoubleClicked: { |
159 | + } |
160 | + onPressAndHold: { |
161 | + } |
162 | + onClicked: { |
163 | + albumTracksModel.filterAlbumTracks(album) |
164 | + mainpage.artist = artist |
165 | + mainpage.album = album |
166 | + mainpage.file = file |
167 | + mainpage.year = year |
168 | + mainpage.cover = cover |
169 | + PopupUtils.open(albumSheet) |
170 | + } |
171 | + } |
172 | + } |
173 | + } |
174 | + } |
175 | + |
176 | + Component { |
177 | + id: albumSheet |
178 | + DefaultSheet { |
179 | + id: sheet |
180 | + anchors.bottomMargin: units.gu(.5) |
181 | + doneButton: false |
182 | + contentsHeight: parent.height |
183 | + contentsWidth: parent.width |
184 | + |
185 | + // Blurred background |
186 | + BlurredBackground { |
187 | + } |
188 | + |
189 | + ListView { |
190 | + clip: true |
191 | + id: albumtrackslist |
192 | + width: parent.width |
193 | + anchors.top: parent.top |
194 | + anchors.bottom: parent.bottom |
195 | + model: albumTracksModel.model |
196 | + delegate: albumTracksDelegate |
197 | + header: ListItem.Standard { |
198 | + id: albumInfo |
199 | + width: parent.width |
200 | + height: units.gu(20) |
201 | UbuntuShape { |
202 | - id: albumShape |
203 | - height: albumItem.width |
204 | - width: albumItem.width |
205 | + id: albumImage |
206 | + anchors.left: parent.left |
207 | + anchors.top: parent.top |
208 | + anchors.verticalCenter: parent.verticalCenter |
209 | + anchors.margins: units.gu(1) |
210 | + height: parent.height |
211 | + width: height |
212 | image: Image { |
213 | - id: icon |
214 | - fillMode: Image.Stretch |
215 | - property string artist: model.artist |
216 | - property string album: model.album |
217 | - property string title: model.title |
218 | - property string cover: model.cover |
219 | - property string length: model.length |
220 | - property string file: model.file |
221 | - property string year: model.year |
222 | - source: cover !== "" ? cover : "images/cover_default.png" |
223 | - } |
224 | - UbuntuShape { // Background so can see text in current state |
225 | - id: albumBg |
226 | - anchors.bottom: parent.bottom |
227 | - color: styleMusic.common.black |
228 | - height: units.gu(4) |
229 | - opacity: .75 |
230 | - width: parent.width |
231 | - } |
232 | - Label { |
233 | - id: albumLabel |
234 | - anchors.bottom: albumArtist.top |
235 | - horizontalAlignment: Text.AlignHCenter |
236 | - color: styleMusic.nowPlaying.labelSecondaryColor |
237 | - elide: Text.ElideRight |
238 | - text: album |
239 | - fontSize: "small" |
240 | - width: parent.width |
241 | - } |
242 | - Label { |
243 | - id: albumArtist |
244 | - anchors.bottom: parent.bottom |
245 | - horizontalAlignment: Text.AlignHCenter |
246 | - color: styleMusic.nowPlaying.labelSecondaryColor |
247 | - elide: Text.ElideRight |
248 | - text: artist |
249 | - fontSize: "small" |
250 | - width: parent.width |
251 | - } |
252 | - |
253 | + source: Library.hasCover(mainpage.file) ? mainpage.cover : Qt.resolvedUrl("images/cover_default.png") |
254 | + } |
255 | } |
256 | - /*Label { |
257 | + Label { |
258 | id: albumTitle |
259 | - width: albumItem.width |
260 | - wrapMode: Text.Wrap |
261 | - horizontalAlignment: Text.AlignHCenter |
262 | + wrapMode: Text.NoWrap |
263 | maximumLineCount: 1 |
264 | - fontSize: "small" |
265 | - anchors.top: albumShape.bottom |
266 | - anchors.horizontalCenter: albumItem.horizontalCenter |
267 | - text: album |
268 | + fontSize: "large" |
269 | + anchors.left: albumImage.right |
270 | + anchors.leftMargin: units.gu(1) |
271 | + anchors.top: parent.top |
272 | + anchors.topMargin: units.gu(1) |
273 | + anchors.right: parent.right |
274 | + text: mainpage.album |
275 | } |
276 | Label { |
277 | id: albumArtist |
278 | - width: albumItem.width |
279 | - wrapMode: Text.Wrap |
280 | - horizontalAlignment: Text.AlignHCenter |
281 | + wrapMode: Text.NoWrap |
282 | maximumLineCount: 1 |
283 | - fontSize: "small" |
284 | - anchors.left: parent.left |
285 | + fontSize: "large" |
286 | + anchors.left: albumImage.right |
287 | + anchors.leftMargin: units.gu(1) |
288 | anchors.top: albumTitle.bottom |
289 | - anchors.horizontalCenter: albumItem.horizontalCenter |
290 | - text: artist |
291 | - } */ |
292 | - |
293 | - MouseArea { |
294 | - anchors.fill: parent |
295 | - onDoubleClicked: { |
296 | - } |
297 | - onPressAndHold: { |
298 | - } |
299 | - onClicked: { |
300 | - albumTracksModel.filterAlbumTracks(album) |
301 | - albumtrackslist.artist = artist |
302 | - albumtrackslist.album = album |
303 | - albumtrackslist.file = file |
304 | - albumtrackslist.year = year |
305 | - albumtrackslist.cover = cover |
306 | - pageStack.push(albumpage) |
307 | - } |
308 | - } |
309 | - } |
310 | - } |
311 | - } |
312 | - } |
313 | - |
314 | - Page { |
315 | - id: albumpage |
316 | - title: i18n.tr("Tracks") |
317 | - visible: false |
318 | - |
319 | - ListView { |
320 | - id: albumtrackslist |
321 | - clip: true |
322 | - property string artist: "" |
323 | - property string album: "" |
324 | - property string file: "" |
325 | - property string year: "" |
326 | - property string cover: "" |
327 | - width: parent.width |
328 | - anchors.top: parent.top |
329 | - anchors.bottom: parent.bottom |
330 | - anchors.bottomMargin: units.gu(8) |
331 | - highlightFollowsCurrentItem: false |
332 | - model: albumTracksModel.model |
333 | - delegate: albumTracksDelegate |
334 | - header: ListItem.Standard { |
335 | - id: albumInfo |
336 | - width: parent.width |
337 | - height: units.gu(20) |
338 | - UbuntuShape { |
339 | - id: albumImage |
340 | - anchors.left: parent.left |
341 | - anchors.top: parent.top |
342 | - anchors.verticalCenter: parent.verticalCenter |
343 | - anchors.margins: units.gu(1) |
344 | - height: parent.height |
345 | - width: height |
346 | - image: Image { |
347 | - source: albumtrackslist.cover !== "" ? albumtrackslist.cover : "images/cover_default.png" |
348 | - } |
349 | - } |
350 | - Label { |
351 | - id: albumArtist |
352 | - wrapMode: Text.NoWrap |
353 | - maximumLineCount: 1 |
354 | - fontSize: "medium" |
355 | - anchors.left: albumImage.right |
356 | - anchors.leftMargin: units.gu(1) |
357 | - anchors.top: parent.top |
358 | - anchors.topMargin: units.gu(1) |
359 | - anchors.right: parent.right |
360 | - text: albumtrackslist.title == "" ? albumtrackslist.file : albumtrackslist.album |
361 | - } |
362 | - Label { |
363 | - id: albumTitle |
364 | - wrapMode: Text.NoWrap |
365 | - maximumLineCount: 1 |
366 | - fontSize: "large" |
367 | - anchors.left: albumImage.right |
368 | - anchors.leftMargin: units.gu(1) |
369 | - anchors.top: albumArtist.bottom |
370 | - anchors.topMargin: units.gu(1) |
371 | - anchors.right: parent.right |
372 | - text: albumtrackslist.artist == "" ? "" : albumtrackslist.artist |
373 | - } |
374 | - Label { |
375 | - id: albumData |
376 | - wrapMode: Text.NoWrap |
377 | - maximumLineCount: 1 |
378 | - fontSize: "small" |
379 | - anchors.left: albumImage.right |
380 | - anchors.leftMargin: units.gu(1) |
381 | - anchors.top: albumTitle.bottom |
382 | - anchors.topMargin: units.gu(1) |
383 | - anchors.right: parent.right |
384 | - text: albumtrackslist.year + " | " + albumTracksModel.model.count + " songs" |
385 | - } |
386 | - } |
387 | - |
388 | - Rectangle { |
389 | - id: expandable |
390 | - anchors.top: albumInfo.bottom |
391 | - anchors.bottom: albumTracksDelegate.top |
392 | - height: units.gu(4.5) |
393 | - width: parent.width |
394 | - color: "black" |
395 | - opacity: 0.7 |
396 | - visible: false |
397 | - } |
398 | - |
399 | - onCountChanged: { |
400 | - albumtrackslist.currentIndex = albumTracksModel.indexOf(currentFile) |
401 | - } |
402 | - |
403 | - Component { |
404 | - id: albumTracksDelegate |
405 | - |
406 | - ListItem.Standard { |
407 | - id: track |
408 | - property string artist: model.artist |
409 | - property string album: model.album |
410 | - property string title: model.title |
411 | - property string cover: model.cover |
412 | - property string length: model.length |
413 | - property string file: model.file |
414 | - iconFrame: false |
415 | - progression: false |
416 | - Rectangle { |
417 | - id: highlight |
418 | - anchors.left: parent.left |
419 | - visible: false |
420 | - width: units.gu(.75) |
421 | - height: parent.height |
422 | - color: styleMusic.listView.highlightColor; |
423 | - } |
424 | - Label { |
425 | - id: trackTitle |
426 | - wrapMode: Text.NoWrap |
427 | - maximumLineCount: 1 |
428 | - fontSize: "medium" |
429 | - anchors.left: parent.left |
430 | - anchors.leftMargin: units.gu(2) |
431 | - anchors.top: parent.top |
432 | - anchors.topMargin: units.gu(1.5) |
433 | - anchors.right: parent.right |
434 | - anchors.bottom: parent.bottom |
435 | - anchors.bottomMargin: units.gu(1.5) |
436 | - text: track.title == "" ? track.file : track.title |
437 | - } |
438 | - |
439 | - onFocusChanged: { |
440 | - } |
441 | - MouseArea { |
442 | - anchors.fill: parent |
443 | - onDoubleClicked: { |
444 | - } |
445 | - onPressAndHold: { |
446 | - PopupUtils.open(trackPopoverComponent, mainView) |
447 | - chosenArtist = artist |
448 | - chosenAlbum = album |
449 | - chosenTitle = title |
450 | - chosenTrack = file |
451 | - chosenCover = cover |
452 | - chosenGenre = genre |
453 | - } |
454 | - onClicked: { |
455 | - if (focus == false) { |
456 | - focus = true |
457 | - } |
458 | - trackClicked(albumTracksModel, index) // play track |
459 | - } |
460 | - } |
461 | - Component.onCompleted: { |
462 | - } |
463 | - states: State { |
464 | - name: "Current" |
465 | - when: track.ListView.isCurrentItem |
466 | - PropertyChanges { target: highlight; visible: true } |
467 | + anchors.topMargin: units.gu(1) |
468 | + anchors.right: parent.right |
469 | + text: mainpage.artist |
470 | + } |
471 | + Label { |
472 | + id: albumYear |
473 | + wrapMode: Text.NoWrap |
474 | + maximumLineCount: 1 |
475 | + fontSize: "medium" |
476 | + anchors.left: albumImage.right |
477 | + anchors.leftMargin: units.gu(1) |
478 | + anchors.top: albumArtist.bottom |
479 | + anchors.topMargin: units.gu(1) |
480 | + anchors.right: parent.right |
481 | + text: mainpage.year |
482 | + } |
483 | + Label { |
484 | + id: albumCount |
485 | + wrapMode: Text.NoWrap |
486 | + maximumLineCount: 1 |
487 | + fontSize: "medium" |
488 | + anchors.left: albumImage.right |
489 | + anchors.leftMargin: units.gu(1) |
490 | + anchors.top: albumYear.bottom |
491 | + anchors.topMargin: units.gu(1) |
492 | + anchors.right: parent.right |
493 | + text: albumTracksModel.model.count + " songs" |
494 | + } |
495 | + |
496 | + } |
497 | + |
498 | + onCountChanged: { |
499 | + albumtrackslist.currentIndex = albumTracksModel.indexOf(currentFile) |
500 | + } |
501 | + |
502 | + Component { |
503 | + id: albumTracksDelegate |
504 | + |
505 | + ListItem.Standard { |
506 | + id: track |
507 | + iconFrame: false |
508 | + progression: false |
509 | + Label { |
510 | + id: trackTitle |
511 | + wrapMode: Text.NoWrap |
512 | + maximumLineCount: 1 |
513 | + fontSize: "large" |
514 | + anchors.left: parent.left |
515 | + anchors.leftMargin: units.gu(2) |
516 | + anchors.top: parent.top |
517 | + anchors.topMargin: units.gu(1.5) |
518 | + anchors.right: parent.right |
519 | + text: model.title == "" ? model.file : model.title |
520 | + } |
521 | + |
522 | + onFocusChanged: { |
523 | + } |
524 | + MouseArea { |
525 | + anchors.fill: parent |
526 | + onDoubleClicked: { |
527 | + } |
528 | + onPressAndHold: { |
529 | + PopupUtils.open(trackPopoverComponent, mainView) |
530 | + chosenArtist = model.artist |
531 | + chosenAlbum = model.album |
532 | + chosenTitle = model.title |
533 | + chosenTrack = model.file |
534 | + } |
535 | + onClicked: { |
536 | + if (focus == false) { |
537 | + focus = true |
538 | + } |
539 | + trackClicked(albumTracksModel, index) // play track |
540 | + // TODO: This closes the SDK defined sheet |
541 | + // component. It should be able to close |
542 | + // albumSheet. |
543 | + PopupUtils.close(sheet) |
544 | + } |
545 | + } |
546 | + Component.onCompleted: { |
547 | + } |
548 | } |
549 | } |
550 | } |
551 | } |
552 | } |
553 | } |
554 | + |
555 | + |
556 | |
557 | === added file 'common/BlurredBackground.qml' |
558 | --- common/BlurredBackground.qml 1970-01-01 00:00:00 +0000 |
559 | +++ common/BlurredBackground.qml 2013-10-09 00:23:35 +0000 |
560 | @@ -0,0 +1,48 @@ |
561 | +/* |
562 | + * Copyright (C) 2013 Andrew Hayzen <ahayzen@gmail.com> |
563 | + * Daniel Holm <d.holmen@gmail.com> |
564 | + * Victor Thompson <victor.thompson@gmail.com> |
565 | + * |
566 | + * This program is free software; you can redistribute it and/or modify |
567 | + * it under the terms of the GNU General Public License as published by |
568 | + * the Free Software Foundation; version 3. |
569 | + * |
570 | + * This program is distributed in the hope that it will be useful, |
571 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
572 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
573 | + * GNU General Public License for more details. |
574 | + * |
575 | + * You should have received a copy of the GNU General Public License |
576 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
577 | + */ |
578 | + |
579 | +import QtQuick 2.0 |
580 | +import Ubuntu.Components 0.1 |
581 | +import QtGraphicalEffects 1.0 |
582 | + |
583 | +// Blurred background |
584 | +Rectangle { |
585 | + anchors.fill: parent |
586 | + // the album art |
587 | + Image { |
588 | + id: backgroundImage |
589 | + anchors.horizontalCenter: parent.horizontalCenter |
590 | + anchors.verticalCenter: parent.verticalCenter |
591 | + source: mainView.currentCoverFull |
592 | + height: parent.height |
593 | + width: height |
594 | + } |
595 | + // the blur |
596 | + FastBlur { |
597 | + anchors.fill: backgroundImage |
598 | + source: backgroundImage |
599 | + radius: units.dp(42) |
600 | + } |
601 | + // transparent white layer |
602 | + Rectangle { |
603 | + anchors.fill: parent |
604 | + color: "white" |
605 | + opacity: 0.7 |
606 | + } |
607 | +} |
608 | + |
609 | |
610 | === modified file 'music-app.qml' |
611 | --- music-app.qml 2013-10-08 13:00:10 +0000 |
612 | +++ music-app.qml 2013-10-09 00:23:35 +0000 |
613 | @@ -756,29 +756,7 @@ |
614 | } |
615 | |
616 | // Blurred background |
617 | - Rectangle { |
618 | - anchors.fill: parent |
619 | - // the album art |
620 | - Image { |
621 | - id: backgroundImage |
622 | - anchors.horizontalCenter: parent.horizontalCenter |
623 | - anchors.verticalCenter: parent.verticalCenter |
624 | - source: mainView.currentCoverFull |
625 | - height: parent.height |
626 | - width: height |
627 | - } |
628 | - // the blur |
629 | - FastBlur { |
630 | - anchors.fill: backgroundImage |
631 | - source: backgroundImage |
632 | - radius: units.dp(42) |
633 | - } |
634 | - // transparent white layer |
635 | - Rectangle { |
636 | - anchors.fill: parent |
637 | - color: "white" |
638 | - opacity: 0.7 |
639 | - } |
640 | + BlurredBackground { |
641 | } |
642 | |
643 | LoadingSpinnerComponent { |
Great, man. I was actually thinking that we probably should use another sheet everywhere. I was just going to change them for playlist and Settings. Also its only the albums and nowPlaying that should be a sheet beside that, so not artist. Aslo we have to be careful not to do stuff twice now when we arn't allowed to merge as easy any more.