[gtk+/icon-shadow: 10/11] entry: use GTK_STYLE_CLASS_IMAGE when rendering the entry icon



commit 7fabba46cbc627b8afca1ffe0b8ca41934fa3f44
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue May 24 21:33:14 2011 -0400

    entry: use GTK_STYLE_CLASS_IMAGE when rendering the entry icon

 gtk/gtkentry.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 04396b0..59b4657 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -6752,6 +6752,9 @@ gtk_entry_ensure_pixbuf (GtkEntry             *entry,
   widget = GTK_WIDGET (entry);
   context = gtk_widget_get_style_context (widget);
 
+  gtk_style_context_save (context);
+  gtk_style_context_add_class (context, GTK_STYLE_CLASS_IMAGE);
+
   switch (icon_info->storage_type)
     {
     case GTK_IMAGE_EMPTY:
@@ -6831,7 +6834,9 @@ gtk_entry_ensure_pixbuf (GtkEntry             *entry,
       g_assert_not_reached ();
       break;
     }
-    
+
+  gtk_style_context_restore (context);
+
   if (icon_info->pixbuf != NULL && icon_info->window != NULL)
     gdk_window_show_unraised (icon_info->window);
 }



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