Merge lp:~mardy/unity-2d/launcher-bg into lp:unity-2d

Proposed by Alberto Mardegan
Status: Merged
Approved by: Florian Boucault
Approved revision: 768
Merged at revision: 767
Proposed branch: lp:~mardy/unity-2d/launcher-bg
Merge into: lp:unity-2d
Diff against target: 33 lines (+9/-3)
2 files modified
libunity-2d-private/Unity2d/GnomeBackground.qml (+6/-2)
libunity-2d-private/src/blendedimageprovider.cpp (+3/-1)
To merge this branch: bzr merge lp:~mardy/unity-2d/launcher-bg
Reviewer Review Type Date Requested Status
Florian Boucault Pending
Review via email: mp+80029@code.launchpad.net

Description of the change

[launcher] Display GNOME background when running in non composite mode

Fix the loading of the background, as well as its positioning inside of the GnomeBackground QML item.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/Unity2d/GnomeBackground.qml'
2--- libunity-2d-private/Unity2d/GnomeBackground.qml 2011-09-21 12:19:17 +0000
3+++ libunity-2d-private/Unity2d/GnomeBackground.qml 2011-10-21 08:40:30 +0000
4@@ -82,8 +82,12 @@
5 height: screen.geometry.height
6
7 smooth: true
8- x: screen.availableGeometry.x - declarativeView.globalPosition.x
9- y: -screen.availableGeometry.y
10+
11+ /* by default, place the background on top of the desktop background,
12+ no matter where the DeclarativeView or the parent object are placed.
13+ */
14+ x: parent.mapFromItem(null, -declarativeView.globalPosition.x, 0).x
15+ y: parent.mapFromItem(null, 0, -declarativeView.globalPosition.y).y
16
17 /* Possible modes are:
18 - "wallpaper"
19
20=== modified file 'libunity-2d-private/src/blendedimageprovider.cpp'
21--- libunity-2d-private/src/blendedimageprovider.cpp 2011-07-29 13:49:34 +0000
22+++ libunity-2d-private/src/blendedimageprovider.cpp 2011-10-21 08:40:30 +0000
23@@ -45,7 +45,9 @@
24
25 /* Merge baseUrl with fileName. If fileName is an absolute path, the result
26 will be fileName itself. */
27- fileName = m_baseUrl.resolved(QUrl::fromLocalFile(fileName)).toLocalFile();
28+ QUrl unresolved = fileName.startsWith("file:") ?
29+ QUrl(fileName) : QUrl::fromLocalFile(fileName);
30+ fileName = m_baseUrl.resolved(unresolved).toLocalFile();
31
32 QString colorName = list[2];
33 if (!QColor::isValidColor(colorName)) {

Subscribers

People subscribed via source and target branches