[gtk+/gtk-style-context: 151/260] 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/260] GtkWidget: Add the default CSS provider to all style contexts.
- Date: Wed, 20 Oct 2010 10:34:07 +0000 (UTC)
commit 847317b45d4b6ddf6cfce004c0e22a1524266640
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 e50ab2f..d20ffa6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13315,6 +13315,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);
@@ -13346,6 +13347,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]