diff options
author | Benjamin Otte <otte@redhat.com> | 2015-02-04 04:43:55 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-03-18 15:23:30 +0100 |
commit | 219e52f7e1d73fa87b31dfc24950ea7bfe2c32dc (patch) | |
tree | 6807a239855028eac2bd98e5774d6486981a6f67 /gtk/gtkcsswidgetnode.c | |
parent | 71813671ef51eb555084a3823e7d6c872870ed2b (diff) | |
download | gtk+-219e52f7e1d73fa87b31dfc24950ea7bfe2c32dc.tar.gz |
cssnode: Automatically recreate style on get_style() call
When the style is invalid, redo it.
Make this a vfunc, so the widget nodes can opt out.
Diffstat (limited to 'gtk/gtkcsswidgetnode.c')
-rw-r--r-- | gtk/gtkcsswidgetnode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c index 0f7e8708a9..f3a91a75e2 100644 --- a/gtk/gtkcsswidgetnode.c +++ b/gtk/gtkcsswidgetnode.c @@ -31,6 +31,14 @@ G_DEFINE_TYPE (GtkCssWidgetNode, gtk_css_widget_node, GTK_TYPE_CSS_NODE) +static GtkCssStyle * +gtk_css_widget_node_update_style (GtkCssNode *cssnode, + GtkCssChange pending_change, + GtkCssStyle *old_style) +{ + return NULL; +} + static void gtk_css_widget_node_set_invalid (GtkCssNode *node, gboolean invalid) @@ -206,6 +214,7 @@ gtk_css_widget_node_class_init (GtkCssWidgetNodeClass *klass) { GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass); + node_class->update_style = gtk_css_widget_node_update_style; node_class->validate = gtk_css_widget_node_validate; node_class->set_invalid = gtk_css_widget_node_set_invalid; node_class->create_widget_path = gtk_css_widget_node_create_widget_path; |