[banshee: 56/61] [SearchEntry] support modifying the entry font



commit b2003ad3c07150614d424060da2624766a58634b
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Oct 21 17:39:45 2009 -0700

    [SearchEntry] support modifying the entry font

 .../Banshee.Widgets/Banshee.Widgets/SearchEntry.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
index d0fc344..058be06 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
@@ -445,9 +445,6 @@ namespace Banshee.Widgets
                 this.parent = parent;
                 HasFrame = false;
                 
-                layout = new Pango.Layout(PangoContext);
-                layout.FontDescription = PangoContext.FontDescription.Copy();
-
                 parent.StyleSet += OnParentStyleSet;
                 WidthChars = 1;
             }
@@ -493,6 +490,11 @@ namespace Banshee.Widgets
                     return ret;
                 }
 
+                if (layout == null) {
+                    layout = new Pango.Layout(PangoContext);
+                    layout.FontDescription = PangoContext.FontDescription.Copy();
+                }
+
                 int width, height;
                 layout.SetMarkup(parent.EmptyMessage);
                 layout.GetPixelSize(out width, out height);



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