diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-01-04 02:31:06 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2011-01-04 03:06:20 +0100 |
commit | e02cbf477015f9046bdc13ed8e2a0c99610223c6 (patch) | |
tree | a488f029009887c836c9e355af65ccb4a8bbc18c /gtk/gtkentrycompletion.c | |
parent | e4c509837f54098f4bcf67d19faa9dbab5c77033 (diff) | |
download | gtk+-e02cbf477015f9046bdc13ed8e2a0c99610223c6.tar.gz |
Make GtkEntryCompletion use GtkStyleContext
Diffstat (limited to 'gtk/gtkentrycompletion.c')
-rw-r--r-- | gtk/gtkentrycompletion.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 0808c1059f..1226723dba 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1510,6 +1510,8 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion, GdkDevice *device) { GtkTreeViewColumn *column; + GtkStyleContext *context; + GdkRGBA color; GList *renderers; GtkWidget *toplevel; @@ -1529,9 +1531,12 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion, column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0); renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column)); - gtk_widget_ensure_style (completion->priv->tree_view); - g_object_set (GTK_CELL_RENDERER (renderers->data), "cell-background-gdk", - >k_widget_get_style (completion->priv->tree_view)->bg[GTK_STATE_NORMAL], + + context = gtk_widget_get_style_context (completion->priv->tree_view); + gtk_style_context_get_background_color (context, 0, &color); + + g_object_set (GTK_CELL_RENDERER (renderers->data), + "cell-background-rgba", &color, NULL); g_list_free (renderers); |