summaryrefslogtreecommitdiff
path: root/gtk/gtkcsspathnode.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-01-31 16:30:05 +0100
committerBenjamin Otte <otte@redhat.com>2015-03-18 15:23:29 +0100
commit03ac5f310bc6b11907d1c4bda152b0191fad7661 (patch)
tree2ab6497069f61a0e019560b81d026887f7fa7da0 /gtk/gtkcsspathnode.c
parent6dc6af674c8c120192c15a943819fe2a152ddfe9 (diff)
downloadgtk+-03ac5f310bc6b11907d1c4bda152b0191fad7661.tar.gz
cssnode: Add gtk_style_context_get_style_provider()
... and use it when looking up properties.
Diffstat (limited to 'gtk/gtkcsspathnode.c')
-rw-r--r--gtk/gtkcsspathnode.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkcsspathnode.c b/gtk/gtkcsspathnode.c
index 52c5a4a9c0..b3588ea54c 100644
--- a/gtk/gtkcsspathnode.c
+++ b/gtk/gtkcsspathnode.c
@@ -77,6 +77,17 @@ gtk_css_path_node_real_get_widget_path (GtkCssNode *node)
return path_node->path;
}
+static GtkStyleProviderPrivate *
+gtk_css_path_node_get_style_provider (GtkCssNode *node)
+{
+ GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
+
+ if (path_node->context == NULL)
+ return GTK_CSS_NODE_CLASS (gtk_css_path_node_parent_class)->get_style_provider (node);
+
+ return gtk_style_context_get_style_provider (path_node->context);
+}
+
static void
gtk_css_path_node_class_init (GtkCssPathNodeClass *klass)
{
@@ -86,6 +97,7 @@ gtk_css_path_node_class_init (GtkCssPathNodeClass *klass)
node_class->set_invalid = gtk_css_path_node_set_invalid;
node_class->create_widget_path = gtk_css_path_node_real_create_widget_path;
node_class->get_widget_path = gtk_css_path_node_real_get_widget_path;
+ node_class->get_style_provider = gtk_css_path_node_get_style_provider;
}
static void