[gtk+] style: Use gtk_widget_get_state() for the entry background



commit d8f3a162c84269e08256993e2c82796a9d37145f
Author: Benjamin Otte <otte redhat com>
Date:   Fri Sep 3 17:09:00 2010 +0200

    style: Use gtk_widget_get_state() for the entry background
    
    New code sets the entry background to GTK_STATE_ACTIVE when it has focus
    and the active color in the default theme looks rather bad.

 gtk/gtkstyle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index e8b13f3..d4fa659 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -2746,7 +2746,7 @@ gtk_default_draw_flat_box (GtkStyle      *style,
           if (!strcmp ("viewportbin", detail))
             gc1 = &style->bg[GTK_STATE_NORMAL];
           else if (!strcmp ("entry_bg", detail))
-            gc1 = &style->base[state_type];
+            gc1 = &style->base[gtk_widget_get_state (widget)];
 
           /* For trees: even rows are base color, odd rows are a shade of
            * the base color, the sort column is a shade of the original color



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