[banshee] Fixed theming of the MessageBar (bgo#557756)



commit 070db1ef1e868b5f5d09fe2d1f4d8111dbe40fb1
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Tue May 12 10:04:04 2009 +1000

    Fixed theming of the MessageBar (bgo#557756)
    
    This commit fixes incorrect initial foreground colour used by the message bar
    and also updates the message bar when the tooltip theme colours change.
---
 .../Hyena.Gui/Hyena.Widgets/MessageBar.cs          |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs b/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
index 4a0a320..ce15542 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
@@ -41,6 +41,8 @@ namespace Hyena.Widgets
         private AnimatedImage image;
         private Label label;
         private Button close_button;
+
+        private Window win;
         
         private Theme theme;
         
@@ -51,6 +53,13 @@ namespace Hyena.Widgets
         
         public MessageBar () : base (0.0f, 0.5f, 1.0f, 0.0f)
         {
+            win = new Window (WindowType.Popup);
+            win.Name = "gtk-tooltips";
+            win.EnsureStyle ();
+            win.StyleSet += delegate {
+                Style = win.Style;
+            };
+
             HBox shell_box = new HBox ();
             shell_box.Spacing = 10;
         
@@ -92,7 +101,7 @@ namespace Hyena.Widgets
             Add (shell_box);
             
             EnsureStyle ();
-            
+
             BorderWidth = 3;
         }
         
@@ -146,10 +155,8 @@ namespace Hyena.Widgets
             }
             
             changing_style = true;
-            Window win = new Window (WindowType.Popup);
-            win.Name = "gtk-tooltips";
-            win.EnsureStyle ();
             Style = win.Style;
+            label.Style = Style;
             changing_style = false;
         }
         



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]