[gtk+/wip/window-unfocused-fixes: 8/13] iconview: Set GTK_STATE_FLAG_WINDOW_UNFOCUSED on draw
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/window-unfocused-fixes: 8/13] iconview: Set GTK_STATE_FLAG_WINDOW_UNFOCUSED on draw
- Date: Tue, 13 Dec 2011 21:03:50 +0000 (UTC)
commit 70faa5c79c121660931cfcb344f4389b6e7c8c4d
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Dec 13 20:28:28 2011 +0000
iconview: Set GTK_STATE_FLAG_WINDOW_UNFOCUSED on draw
https://bugzilla.gnome.org/show_bug.cgi?id=666126
gtk/gtkiconview.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 67141ec..3fd7f67 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1463,10 +1463,14 @@ _gtk_icon_view_update_background (GtkIconView *icon_view)
if (gtk_widget_get_realized (widget))
{
GtkStyleContext *context;
+ GtkStateFlags state = 0;
context = gtk_widget_get_style_context (widget);
+ state |= (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_WINDOW_UNFOCUSED);
+
gtk_style_context_save (context);
+ gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
gtk_style_context_set_background (context, gtk_widget_get_window (widget));
@@ -2993,6 +2997,8 @@ gtk_icon_view_paint_item (GtkIconView *icon_view,
flags |= GTK_CELL_RENDERER_PRELIT;
}
+ state |= (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_WINDOW_UNFOCUSED);
+
gtk_style_context_set_state (style_context, state);
if (item->selected)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]