diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-09-27 19:24:31 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2012-09-27 19:43:50 +0200 |
commit | ecd84fac48a56f1ebc984f1ee0d9dff30260c961 (patch) | |
tree | d2983c855edf284293771ecc886ce60c5b00b6da | |
parent | 3c7a6581dcb49224bb749036374dd87bf32e9903 (diff) | |
download | gtk+-ecd84fac48a56f1ebc984f1ee0d9dff30260c961.tar.gz |
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
-rw-r--r-- | gtk/gtkiconview.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index a1df572e1e..7eb50aee68 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; } |