[gtk+/gtk-style-context: 151/533] GtkWidget: Add the default CSS provider to all style contexts.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 151/533] GtkWidget: Add the default CSS provider to all style contexts.
- Date: Wed, 1 Dec 2010 02:18:24 +0000 (UTC)
commit c9fac520a9f7b5e4b0549b5fed143fb4495ab066
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 bd4d50b..ccc3db3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13297,6 +13297,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);
@@ -13328,6 +13329,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]