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
=== modified file 'src/PanelHomeButton.cpp'
--- src/PanelHomeButton.cpp 2011-04-18 13:21:26 +0000
+++ src/PanelHomeButton.cpp 2011-04-26 15:50:52 +0000
@@ -40,6 +40,7 @@
4040
41PanelHomeButton::PanelHomeButton ()41PanelHomeButton::PanelHomeButton ()
42: TextureArea (NUX_TRACKER_LOCATION),42: TextureArea (NUX_TRACKER_LOCATION),
43 _opacity (1.0f),
43 _urgent_interest (0)44 _urgent_interest (0)
44{45{
45 _urgent_count = 0;46 _urgent_count = 0;
@@ -141,7 +142,7 @@
141142
142 /* button pressed effect */143 /* button pressed effect */
143 if (_pressed) {144 if (_pressed) {
144 if (PanelStyle::GetDefault ()->IsAmbianceOrRadiance ()) {145 if (PanelStyle::GetDefault ()->IsAmbianceOrRadiance () && _opacity == 1.0f) {
145 /* loads background panel upside-down */146 /* loads background panel upside-down */
146 overlay = gdk_pixbuf_flip (PanelStyle::GetDefault ()->GetBackground (width - 2, height), FALSE);147 overlay = gdk_pixbuf_flip (PanelStyle::GetDefault ()->GetBackground (width - 2, height), FALSE);
147 if (GDK_IS_PIXBUF (overlay)) {148 if (GDK_IS_PIXBUF (overlay)) {
@@ -377,3 +378,8 @@
377PanelHomeButton::ProcessDndDrop (int x, int y)378PanelHomeButton::ProcessDndDrop (int x, int y)
378{379{
379}380}
381
382void
383PanelHomeButton::SetOpacity (float opacity) {
384 _opacity = opacity;
385}
380386
=== modified file 'src/PanelHomeButton.h'
--- src/PanelHomeButton.h 2011-04-16 14:31:46 +0000
+++ src/PanelHomeButton.h 2011-04-26 15:50:52 +0000
@@ -44,6 +44,7 @@
44 void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);44 void RecvMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
4545
46 void SetButtonWidth (int button_width);46 void SetButtonWidth (int button_width);
47 void SetOpacity (float opacity);
4748
48protected:49protected:
49 const gchar* GetName ();50 const gchar* GetName ();
@@ -66,6 +67,7 @@
66 int _button_width;67 int _button_width;
67 int _urgent_count;68 int _urgent_count;
68 bool _pressed;69 bool _pressed;
70 float _opacity;
69 71
70 gulong _theme_changed_id;72 gulong _theme_changed_id;
71 guint _urgent_interest;73 guint _urgent_interest;
7274
=== modified file 'src/PanelView.cpp'
--- src/PanelView.cpp 2011-04-19 14:30:27 +0000
+++ src/PanelView.cpp 2011-04-26 15:50:52 +0000
@@ -423,6 +423,8 @@
423 return;423 return;
424424
425 _opacity = opacity;425 _opacity = opacity;
426
427 _home_button->SetOpacity (opacity);
426 428
427 ForceUpdateBackground ();429 ForceUpdateBackground ();
428}430}