Merge lp:~vthompson/music-app/remix-update-CoverGrid-sourceSize into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 732
Merged at revision: 732
Proposed branch: lp:~vthompson/music-app/remix-update-CoverGrid-sourceSize
Merge into: lp:music-app/remix
Diff against target: 49 lines (+21/-4)
2 files modified
common/BlurredBackground.qml (+12/-2)
common/CoverGrid.qml (+9/-2)
To merge this branch: bzr merge lp:~vthompson/music-app/remix-update-CoverGrid-sourceSize
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Andrew Hayzen Approve
Review via email: mp+241358@code.launchpad.net

Commit message

* Set the sourceSize of the CoverGrid to the Thumbnailer's 'xlarge' default.

Description of the change

This sets the sourceSize in the CoverGrid to that of the Thumbnailer's largest (xlarge) thumbnail, which is 512x512 pixels. Previously rescaling these to 330 and 165 (see bug report) was causing the thumbnails to load very slowly.

To post a comment you must log in.
732. By Victor Thompson

* Update BlurredBackground

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Awesome find LGTM :)

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'common/BlurredBackground.qml'
2--- common/BlurredBackground.qml 2014-10-21 20:11:35 +0000
3+++ common/BlurredBackground.qml 2014-11-11 02:46:56 +0000
4@@ -41,11 +41,21 @@
5 anchors.horizontalCenter: parent.horizontalCenter
6 anchors.verticalCenter: parent.verticalCenter
7 asynchronous: true
8- source: art // this has to be fixed for the default cover art to work - cant find in this dir
9 fillMode: Image.PreserveAspectCrop
10 height: parent.height
11+ source: art // this has to be fixed for the default cover art to work - cant find in this dir
12+
13+ // TODO: This should be investigated once http://pad.lv/1391368
14+ // is resolved. Once it is, these can either be set to
15+ // "height" and "width" or a property exposed via the
16+ // SDK or Thumbnailer to avoid a regression caused by
17+ // these hardcoded values changing in the Thumbnailer.
18+ // 512 is size of the "xlarge" thumbnails in pixels.
19+ sourceSize.height: 512
20+ sourceSize.width: 512
21+
22+ visible: false
23 width: Math.max(parent.height, parent.width)
24- visible: false
25 }
26
27 // the blur
28
29=== modified file 'common/CoverGrid.qml'
30--- common/CoverGrid.qml 2014-10-21 20:11:35 +0000
31+++ common/CoverGrid.qml 2014-11-11 02:46:56 +0000
32@@ -61,8 +61,15 @@
33 ? coverGrid.covers[index].art
34 : "image://albumart/artist=" + coverGrid.covers[index].author + "&album=" + coverGrid.covers[index].album)
35 : ""
36- sourceSize.height: height
37- sourceSize.width: width
38+
39+ // TODO: This should be investigated once http://pad.lv/1391368
40+ // is resolved. Once it is, these can either be set to
41+ // "height" and "width" or a property exposed via the
42+ // SDK or Thumbnailer to avoid a regression caused by
43+ // these hardcoded values changing in the Thumbnailer.
44+ // 512 is size of the "xlarge" thumbnails in pixels.
45+ sourceSize.height: 512
46+ sourceSize.width: 512
47
48 onStatusChanged: {
49 if (status === Image.Error) {

Subscribers

People subscribed via source and target branches