[gtk+] cellrendererpixbuf: Follow state even when insensitive



commit 502d7644fea442c4ad1bbeff08ffb6d858e13e3b
Author: Benjamin Otte <otte redhat com>
Date:   Thu Sep 5 18:42:53 2013 +0200

    cellrendererpixbuf: Follow state even when insensitive

 gtk/gtkcellrendererpixbuf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index ee1c068..1ae7995 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -533,11 +533,11 @@ gtk_cell_renderer_pixbuf_render (GtkCellRenderer      *cell,
 
   state = GTK_STATE_FLAG_NORMAL;
 
-  if (!gtk_widget_get_sensitive (widget) ||
+  if (priv->follow_state)
+    state = gtk_cell_renderer_get_state (cell, widget, flags);
+  else if (!gtk_widget_get_sensitive (widget) ||
       !gtk_cell_renderer_get_sensitive (cell))
     state |= GTK_STATE_FLAG_INSENSITIVE;
-  else if (priv->follow_state)
-    state = gtk_cell_renderer_get_state (cell, widget, flags);
 
   gtk_style_context_set_state (context, state);
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_IMAGE);


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