Merge lp:~marcobiscaro2112/unity/fixes-767733 into lp:unity

Proposed by Marco Biscaro
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1191
Proposed branch: lp:~marcobiscaro2112/unity/fixes-767733
Merge into: lp:unity
Diff against target: 62 lines (+11/-1)
3 files modified
src/PanelHomeButton.cpp (+7/-1)
src/PanelHomeButton.h (+2/-0)
src/PanelView.cpp (+2/-0)
To merge this branch: bzr merge lp:~marcobiscaro2112/unity/fixes-767733
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+59093@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

works well, approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/PanelHomeButton.cpp'
2--- src/PanelHomeButton.cpp 2011-04-18 13:21:26 +0000
3+++ src/PanelHomeButton.cpp 2011-04-26 15:50:52 +0000
4@@ -40,6 +40,7 @@
5
6 PanelHomeButton::PanelHomeButton ()
7 : TextureArea (NUX_TRACKER_LOCATION),
8+ _opacity (1.0f),
9 _urgent_interest (0)
10 {
11 _urgent_count = 0;
12@@ -141,7 +142,7 @@
13
14 /* button pressed effect */
15 if (_pressed) {
16- if (PanelStyle::GetDefault ()->IsAmbianceOrRadiance ()) {
17+ if (PanelStyle::GetDefault ()->IsAmbianceOrRadiance () && _opacity == 1.0f) {
18 /* loads background panel upside-down */
19 overlay = gdk_pixbuf_flip (PanelStyle::GetDefault ()->GetBackground (width - 2, height), FALSE);
20 if (GDK_IS_PIXBUF (overlay)) {
21@@ -377,3 +378,8 @@
22 PanelHomeButton::ProcessDndDrop (int x, int y)
23 {
24 }
25+
26+void
27+PanelHomeButton::SetOpacity (float opacity) {
28+ _opacity = opacity;
29+}
30
31=== modified file 'src/PanelHomeButton.h'
32--- src/PanelHomeButton.h 2011-04-16 14:31:46 +0000
33+++ src/PanelHomeButton.h 2011-04-26 15:50:52 +0000
34@@ -44,6 +44,7 @@
35 void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
36
37 void SetButtonWidth (int button_width);
38+ void SetOpacity (float opacity);
39
40 protected:
41 const gchar* GetName ();
42@@ -66,6 +67,7 @@
43 int _button_width;
44 int _urgent_count;
45 bool _pressed;
46+ float _opacity;
47
48 gulong _theme_changed_id;
49 guint _urgent_interest;
50
51=== modified file 'src/PanelView.cpp'
52--- src/PanelView.cpp 2011-04-19 14:30:27 +0000
53+++ src/PanelView.cpp 2011-04-26 15:50:52 +0000
54@@ -423,6 +423,8 @@
55 return;
56
57 _opacity = opacity;
58+
59+ _home_button->SetOpacity (opacity);
60
61 ForceUpdateBackground ();
62 }