[banshee/gtk3] SearchEntry: Fix rendering for search entry



commit 2f8e84802b76eabb2c3169997ab86a022f51075f
Author: Olivier Dufour <olivier duff gmail com>
Date:   Sun Dec 11 18:56:09 2011 +0100

    SearchEntry: Fix rendering for search entry
    
    Fix icon padding
    Fix text display

 .../Banshee.Widgets/Banshee.Widgets/SearchEntry.cs |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
index 7b2b72e..dc11c42 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
@@ -209,8 +209,7 @@ namespace Banshee.Widgets
             var color = entry.StyleContext.GetBackgroundColor (entry.StateFlags);
             filter_button.OverrideBackgroundColor (entry.StateFlags, color);
             clear_button.OverrideBackgroundColor (entry.StateFlags, color);
-
-            box.BorderWidth = (uint)entry.StyleContext.GetBorder (StateFlags).Left;
+            box.BorderWidth = (uint)entry.StyleContext.GetPadding (StateFlags).Left;
         }
 
         private void OnInnerEntryStyleUpdated (object o, EventArgs args)
@@ -479,21 +478,21 @@ namespace Banshee.Widgets
                 // separate window, so we can ensure that for themes that don't
                 // respect HasFrame, we never ever allow the base frame drawing
                 // to happen
-                if (CairoHelper.ShouldDrawWindow (cr, Window)) {
+                if (!CairoHelper.ShouldDrawWindow (cr, Window)) {
                     return true;
                 }
 
                 bool ret = base.OnDrawn (cr);
 
-                StyleContext.Save ();
-                //use entry class to have free theming
-                StyleContext.AddClass ("entry");
-                StyleContext.State = StateFlags.Insensitive;
-
                 if(Text.Length > 0 || HasFocus || parent.EmptyMessage == null) {
                     return ret;
                 }
 
+                StyleContext.Save ();
+                //use entry class to have free theming
+                StyleContext.AddClass ("entry");
+                StyleContext.State = StateFlags.Insensitive ;
+
                 if (layout == null) {
                     layout = new Pango.Layout(PangoContext);
                     layout.FontDescription = PangoContext.FontDescription;



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