summaryrefslogtreecommitdiff
path: root/gtk/gtkactionbar.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-08-04 19:18:58 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2016-10-18 11:49:12 +0100
commit2e0d3ef8668312052836dd8e9221b1d06e451e46 (patch)
treed6271d3097c92bcb677f824ff1131685c380c027 /gtk/gtkactionbar.c
parentabe19f1826a73bd846888ffd7077168b23be6693 (diff)
downloadgtk+-2e0d3ef8668312052836dd8e9221b1d06e451e46.tar.gz
gtk: Port GtkActionBar to render nodes
Diffstat (limited to 'gtk/gtkactionbar.c')
-rw-r--r--gtk/gtkactionbar.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index f26796bcf3..870cb3b513 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -199,29 +199,19 @@ gtk_action_bar_set_child_property (GtkContainer *container,
value);
}
-static gboolean
-gtk_action_bar_render (GtkCssGadget *gadget,
- cairo_t *cr,
- int x,
- int y,
- int width,
- int height,
- gpointer data)
-{
- GTK_WIDGET_CLASS (gtk_action_bar_parent_class)->draw (gtk_css_gadget_get_owner (gadget), cr);
-
- return FALSE;
-}
-
-static gboolean
-gtk_action_bar_draw (GtkWidget *widget,
- cairo_t *cr)
+static GskRenderNode *
+gtk_action_bar_get_render_node (GtkWidget *widget,
+ GskRenderer *renderer)
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
+ GskRenderNode *node = gtk_css_gadget_get_render_node (priv->gadget, renderer, FALSE);
+
+ if (node == NULL)
+ return NULL;
- gtk_css_gadget_draw (priv->gadget, cr);
+ gtk_container_propagate_render_node (GTK_CONTAINER (widget), renderer, node);
- return FALSE;
+ return node;
}
static void
@@ -320,7 +310,7 @@ gtk_action_bar_class_init (GtkActionBarClass *klass)
widget_class->show = gtk_action_bar_show;
widget_class->hide = gtk_action_bar_hide;
widget_class->destroy = gtk_action_bar_destroy;
- widget_class->draw = gtk_action_bar_draw;
+ widget_class->get_render_node = gtk_action_bar_get_render_node;
widget_class->size_allocate = gtk_action_bar_size_allocate;
widget_class->get_preferred_width_for_height = gtk_action_bar_get_preferred_width_for_height;
widget_class->get_preferred_height_and_baseline_for_width = gtk_action_bar_get_preferred_height_and_baseline_for_width;
@@ -373,7 +363,7 @@ gtk_action_bar_init (GtkActionBar *action_bar)
GTK_WIDGET (action_bar),
gtk_action_bar_measure,
gtk_action_bar_allocate,
- gtk_action_bar_render,
+ NULL,
NULL,
NULL);
}