[gtk/deprecate-all-the-cells: 9/15] flowbox: Stop using gtk_render_background
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/deprecate-all-the-cells: 9/15] flowbox: Stop using gtk_render_background
- Date: Tue, 11 Oct 2022 21:19:45 +0000 (UTC)
commit 681a818af29e8a6ab29f94446f0b95fdfe2a169e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 8 08:28:46 2022 -0400
flowbox: Stop using gtk_render_background
The gtk_render_ apis are getting deprecated.
gtk/gtkflowbox.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 16ae39cfb5..38eeeaff64 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -2570,6 +2570,8 @@ gtk_flow_box_snapshot (GtkWidget *widget,
cairo_path_t *path;
GtkBorder border;
const GdkRGBA *border_color;
+ GtkSnapshot *bg_snapshot;
+ GskRenderNode *node;
if (vertical)
path_from_vertical_line_rects (cr, (GdkRectangle *)lines->data, lines->len);
@@ -2583,7 +2585,16 @@ gtk_flow_box_snapshot (GtkWidget *widget,
cairo_save (cr);
cairo_clip (cr);
- gtk_render_background (context, cr, x, y, width, height);
+
+ bg_snapshot = gtk_snapshot_new ();
+ gtk_snapshot_render_background (bg_snapshot, context, x, y, width, height);
+ node = gtk_snapshot_free_to_node (bg_snapshot);
+ if (node)
+ {
+ gsk_render_node_draw (node, cr);
+ gsk_render_node_unref (node);
+ }
+
cairo_restore (cr);
cairo_append_path (cr, path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]