mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
popover: Stop using gtk_render_background
The gtk_render_ apis are getting deprecated.
This commit is contained in:
parent
0c99e69423
commit
da5d5bd71f
@ -125,7 +125,6 @@
|
||||
#include "gtkcssboxesimplprivate.h"
|
||||
#include "gtknativeprivate.h"
|
||||
|
||||
#include "gtkrender.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkroundedboxprivate.h"
|
||||
#include "gsk/gskroundedrectprivate.h"
|
||||
@ -1549,6 +1548,8 @@ create_arrow_render_node (GtkPopover *popover)
|
||||
GtkBorder border;
|
||||
cairo_t *cr;
|
||||
GtkSnapshot *snapshot;
|
||||
GtkSnapshot *bg_snapshot;
|
||||
GskRenderNode *node;
|
||||
|
||||
snapshot = gtk_snapshot_new ();
|
||||
|
||||
@ -1570,10 +1571,18 @@ create_arrow_render_node (GtkPopover *popover)
|
||||
gtk_style_context_save_to_node (context, priv->arrow_node);
|
||||
|
||||
/* Render the arrow background */
|
||||
gtk_render_background (context, cr,
|
||||
bg_snapshot = gtk_snapshot_new ();
|
||||
gtk_snapshot_render_background (bg_snapshot,
|
||||
context,
|
||||
0, 0,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
node = gtk_snapshot_free_to_node (bg_snapshot);
|
||||
if (node)
|
||||
{
|
||||
gsk_render_node_draw (node, cr);
|
||||
gsk_render_node_unref (node);
|
||||
}
|
||||
|
||||
/* Render the border of the arrow tip */
|
||||
if (border.bottom > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user