[gtk+/gtk-style-context: 153/206] GtkWidget: Add the default CSS provider to all style contexts.



commit 3969deefe591bc208a6fac4afab9de0ee78acc4b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 2 16:16:50 2010 +0200

    GtkWidget: Add the default CSS provider to all style contexts.

 gtk/gtkwidget.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9c3e63e..633a46e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11652,6 +11652,7 @@ gtk_widget_get_style_context (GtkWidget *widget)
   if (G_UNLIKELY (!context))
     {
       static GtkCssProvider *css_provider = NULL;
+      GtkCssProvider *default_provider;
       GtkWidgetPath *path;
 
       context = g_object_new (GTK_TYPE_STYLE_CONTEXT, NULL);
@@ -11683,6 +11684,10 @@ gtk_widget_get_style_context (GtkWidget *widget)
                                       GTK_STYLE_PROVIDER (css_provider),
                                       GTK_STYLE_PROVIDER_PRIORITY_USER);
 
+      default_provider = gtk_css_provider_get_default ();
+      gtk_style_context_add_provider (context,
+                                      GTK_STYLE_PROVIDER (default_provider),
+                                      GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
 
       path = gtk_widget_get_path (widget);
       gtk_style_context_set_path (context, path);



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