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.
This commit is contained in:
Benjamin Otte
2015-02-04 04:43:55 +01:00
parent 71813671ef
commit 219e52f7e1
6 changed files with 44 additions and 36 deletions

View File

@ -22,13 +22,6 @@
G_DEFINE_TYPE (GtkCssTransientNode, gtk_css_transient_node, GTK_TYPE_CSS_NODE)
static void
gtk_css_transient_node_invalidate (GtkCssNode *node,
GtkCssChange change)
{
gtk_css_node_set_style (node, NULL);
}
static void
gtk_css_transient_node_set_invalid (GtkCssNode *node,
gboolean invalid)
@ -71,7 +64,6 @@ gtk_css_transient_node_class_init (GtkCssTransientNodeClass *klass)
{
GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass);
node_class->invalidate = gtk_css_transient_node_invalidate;
node_class->set_invalid = gtk_css_transient_node_set_invalid;
node_class->create_widget_path = gtk_css_transient_node_create_widget_path;
node_class->get_widget_path = gtk_css_transient_node_get_widget_path;