[gtk+/composite-templates] iconview: Render focus even in non-selected items



commit 008cb03fefe3c7d304882c5a91af35375e743c2d
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Sep 27 19:24:31 2012 +0200

    iconview: Render focus even in non-selected items
    
    This is needed for the SELECTION_NONE mode where nothing is ever
    selected, but its also needed for CTRL-<key> keynav that moves the
    focus without changing the selection.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684984

 gtk/gtkiconview.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index a1df572..7eb50ae 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -3042,14 +3042,12 @@ gtk_icon_view_paint_item (GtkIconView     *icon_view,
 
   state &= ~(GTK_STATE_FLAG_SELECTED | GTK_STATE_FLAG_PRELIGHT);
 
+  if ((state & GTK_STATE_FLAG_FOCUSED) &&
+      item == icon_view->priv->cursor_item)
+    flags |= GTK_CELL_RENDERER_FOCUSED;
+
   if (item->selected)
     {
-      if ((state & GTK_STATE_FLAG_FOCUSED) &&
-          item == icon_view->priv->cursor_item)
-        {
-          flags |= GTK_CELL_RENDERER_FOCUSED;
-        }
-
       state |= GTK_STATE_FLAG_SELECTED;
       flags |= GTK_CELL_RENDERER_SELECTED;
     }



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