#include "gtkcssboxesimplprivate.h"
#include "gtknativeprivate.h"
-#include "gtkstylecontextprivate.h"
#include "gtkroundedboxprivate.h"
#include "gsk/gskroundedrectprivate.h"
#include "gtkcssshadowvalueprivate.h"
{
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
GtkWidget *widget = GTK_WIDGET (popover);
- GtkStyleContext *context;
GtkBorder border;
cairo_t *cr;
GtkSnapshot *snapshot;
GtkSnapshot *bg_snapshot;
GskRenderNode *node;
GtkCssBoxes boxes;
+ GtkCssStyle *style;
snapshot = gtk_snapshot_new ();
get_border (priv->arrow_node, &border);
- context = gtk_widget_get_style_context (widget);
- gtk_style_context_save_to_node (context, priv->arrow_node);
+ style = gtk_css_node_get_style (priv->arrow_node);
/* Render the arrow background */
bg_snapshot = gtk_snapshot_new ();
- gtk_css_boxes_init_border_box (&boxes,
- gtk_style_context_lookup_style (context),
+ gtk_css_boxes_init_border_box (&boxes, style,
0, 0,
gtk_widget_get_width (widget),
gtk_widget_get_height (widget));
/* Render the border of the arrow tip */
if (border.bottom > 0)
{
- GtkCssStyle *style;
const GdkRGBA *border_color;
- style = gtk_css_node_get_style (priv->arrow_node);
border_color = gtk_css_color_value_get_rgba (style->border->border_left_color ? style->border->border_left_color : style->core->color);
gtk_popover_apply_tail_path (popover, cr);
cairo_restore (cr);
cairo_destroy (cr);
- gtk_style_context_restore (context);
-
priv->arrow_render_node = gtk_snapshot_free_to_node (snapshot);
}