Merge lp:~gerboland/unity-2d/averageBgColor-use-our-key into lp:unity-2d

Proposed by Gerry Boland on 2012-03-22
Status: Merged
Approved by: Didier Roche on 2012-03-23
Approved revision: 1010
Merged at revision: 1010
Proposed branch: lp:~gerboland/unity-2d/averageBgColor-use-our-key
Merge into: lp:unity-2d
Diff against target: 76 lines (+10/-5)
5 files modified
data/com.canonical.Unity2d.gschema.xml (+5/-0)
libunity-2d-private/src/panelpalettemanager.cpp (+2/-2)
shell/WallpaperColor.qml (+1/-1)
shell/common/Background.qml (+1/-1)
shell/launcher/Launcher.qml (+1/-1)
To merge this branch: bzr merge lp:~gerboland/unity-2d/averageBgColor-use-our-key
Reviewer Review Type Date Requested Status
Michał Sawicz 2012-03-22 Approve on 2012-03-22
Review via email: mp+98838@code.launchpad.net

Commit Message

[shell,panel] use unity-2d specific dconf key for average-bg-color

UNBLOCK

Description of the Change

Use Unity2d specific dconf key for average-bg-color as Unity removed it from their schema

Unity removed the average-bg-color key from the com.canonical.Unity schema. For now we will duplicate this key until we fully support the new root window atom containing the average background colour.

UNBLOCK

To post a comment you must log in.
Michał Sawicz (saviq) :
review: Approve
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity-2d/220/console reported an error when processing this lp:~gerboland/unity-2d/averageBgColor-use-our-key branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.Unity2d.gschema.xml'
2--- data/com.canonical.Unity2d.gschema.xml 2012-03-13 12:38:14 +0000
3+++ data/com.canonical.Unity2d.gschema.xml 2012-03-22 16:20:25 +0000
4@@ -20,6 +20,11 @@
5 <summary>Sticky edges.</summary>
6 <description>Whether the edges in a multi-monitor setup should be sticky or not (Edges with autohide launchers are always sticky).</description>
7 </key>
8+ <key type="s" name="average-bg-color">
9+ <default>'#75507B'</default>
10+ <summary>Average background color</summary>
11+ <description>The average color derived from the currently set desktop-wallpaper.</description>
12+ </key>
13 </schema>
14 <schema path="/com/canonical/unity-2d/launcher/" id="com.canonical.Unity2d.Launcher" gettext-domain="unity-2d">
15 <key type="b" name="super-key-enable">
16
17=== modified file 'libunity-2d-private/src/panelpalettemanager.cpp'
18--- libunity-2d-private/src/panelpalettemanager.cpp 2012-03-20 14:50:42 +0000
19+++ libunity-2d-private/src/panelpalettemanager.cpp 2012-03-22 16:20:25 +0000
20@@ -51,7 +51,7 @@
21 connect(HUDClient::instance(), SIGNAL(activeChanged(bool)), this, SLOT(updatePalette()));
22 connect(DashClient::instance(), SIGNAL(screenChanged(int)), this, SLOT(updatePalette()));
23 connect(HUDClient::instance(), SIGNAL(screenChanged(int)), this, SLOT(updatePalette()));
24- connect(&unityConfiguration(), SIGNAL(averageBgColor(QVariant)), this, SLOT(updatePalette()));
25+ connect(&unity2dConfiguration(), SIGNAL(averageBgColorChanged(QString)), this, SLOT(updatePalette()));
26
27 m_gConnector.connect(gtk_settings_get_default(), "notify::gtk-theme-name", G_CALLBACK(onThemeChanged), this);
28 updatePalette();
29@@ -82,7 +82,7 @@
30 QPalette pal;
31 if (DashClient::instance()->activeInScreen(m_panel->screen()) || HUDClient::instance()->activeInScreen(m_panel->screen())) {
32 /* The background color is the same as in the launcher */
33- QColor wallpaperColor(unityConfiguration().property("averageBgColor").toString());
34+ QColor wallpaperColor(unity2dConfiguration().property("averageBgColor").toString());
35 QColor backgroundColor(wallpaperColor.red(), wallpaperColor.green(), wallpaperColor.blue(), 168);
36 backgroundColor = backgroundColor.darker(800);
37 pal.setBrush(QPalette::Window, backgroundColor);
38
39=== modified file 'shell/WallpaperColor.qml'
40--- shell/WallpaperColor.qml 2012-03-20 14:50:42 +0000
41+++ shell/WallpaperColor.qml 2012-03-22 16:20:25 +0000
42@@ -58,7 +58,7 @@
43 }
44
45 Binding {
46- target: unityConfiguration
47+ target: unity2dConfiguration
48 property: "averageBgColor"
49 value: desktopBackground.pictureUri != "" ? imageUtilities.averageColor : desktopBackground.primaryColor
50 }
51
52=== modified file 'shell/common/Background.qml'
53--- shell/common/Background.qml 2012-03-20 14:57:00 +0000
54+++ shell/common/Background.qml 2012-03-22 16:20:25 +0000
55@@ -53,7 +53,7 @@
56 dash.
57 */
58 effect: ColorizeEffect {
59- color: unityConfiguration.averageBgColor
60+ color: unity2dConfiguration.averageBgColor
61 saturation: 0.4
62 }
63 Image {
64
65=== modified file 'shell/launcher/Launcher.qml'
66--- shell/launcher/Launcher.qml 2012-03-20 14:50:42 +0000
67+++ shell/launcher/Launcher.qml 2012-03-22 16:20:25 +0000
68@@ -68,7 +68,7 @@
69 anchors.fill: parent
70 anchors.rightMargin: Utils.isLeftToRight() && !border.visible ? border.width : 0
71 anchors.leftMargin: Utils.isRightToLeft() && !border.visible ? border.width : 0
72- color: Qt.darker(unityConfiguration.averageBgColor, 8.0)
73+ color: Qt.darker(unity2dConfiguration.averageBgColor, 8.0)
74 opacity: 0.66
75 visible: desktop.isCompositingManagerRunning
76 }

Subscribers

People subscribed via source and target branches