[banshee] [SourceView] fixed theme issues



commit aa3db1dcf89fcaaac9c2098b3369eacdea2335e6
Author: Aaron Bockover <abockover novell com>
Date:   Sun May 2 16:19:24 2010 -0400

    [SourceView] fixed theme issues
    
    Create the Hyena GUI theme in OnStyleSet, not OnRealize, and also make a
    DrawFrameBorder theme call after rendering contents

 .../Banshee.Sources.Gui/SourceView.cs              |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index cf7b01a..6b1fd5c 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -152,12 +152,10 @@ namespace Banshee.Sources.Gui
 
 #region Gtk.Widget Overrides
 
-        protected override void OnRealized ()
+        protected override void OnStyleSet (Style old_style)
         {
-            base.OnRealized ();
-
-            theme = new GtkTheme (this);
-            // theme.RefreshColors ();
+            base.OnStyleSet (old_style);
+            theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
         }
 
         protected override bool OnButtonPressEvent (Gdk.EventButton press)
@@ -257,7 +255,10 @@ namespace Banshee.Sources.Gui
 
             try {
                 cr = Gdk.CairoHelper.Create (evnt.Window);
-                return base.OnExposeEvent (evnt);
+                base.OnExposeEvent (evnt);
+                theme.DrawFrameBorder (cr, new Gdk.Rectangle (0, 0,
+                    Allocation.Width, Allocation.Height));
+                return true;
             } finally {
                 CairoExtensions.DisposeContext (cr);
                 cr = null;



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