[gtk+] Make GtkEntry set the style context state.



commit 0e77486e91fe5b0c3cdc2688a6323bb0a27b9641
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jan 17 03:54:58 2011 +0100

    Make GtkEntry set the style context state.

 gtk/gtkentry.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index bb20731..0b905db 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3506,6 +3506,9 @@ gtk_entry_draw (GtkWidget *widget,
   if (gtk_widget_has_focus (widget))
     state |= GTK_STATE_FLAG_FOCUSED;
 
+  gtk_style_context_save (context);
+  gtk_style_context_set_state (context, state);
+
   if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
     {
       /* Draw entry_bg, shadow, progress and focus */
@@ -3547,6 +3550,8 @@ gtk_entry_draw (GtkWidget *widget,
         }
     }
 
+  gtk_style_context_restore (context);
+
   return FALSE;
 }
 



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