From 052962a76098a1bde15f6eaabc774b32f30299f2 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 7 Aug 2020 02:50:19 +0200 Subject: [PATCH] treeview: Use gtk_snapshot_append_border() No need to construct the node manually. --- gtk/gtktreeview.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 0898adea77..98d9f40e5c 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -13156,19 +13156,15 @@ gtk_treeview_snapshot_border (GtkSnapshot *snapshot, const graphene_rect_t *rect) { GskRoundedRect rounded; - GskRenderNode *border_node; gsk_rounded_rect_init_from_rect (&rounded, rect, 0); #define BLACK { 0, 0, 0, 1 } - border_node = gsk_border_node_new (&rounded, - (float[4]) { 1, 1, 1, 1 }, - (GdkRGBA[4]) { BLACK, BLACK, BLACK, BLACK }); + gtk_snapshot_append_border (snapshot, + &rounded, + (float[4]) { 1, 1, 1, 1 }, + (GdkRGBA[4]) { BLACK, BLACK, BLACK, BLACK }); #undef BLACK - - gtk_snapshot_append_node (snapshot, border_node); - - gsk_render_node_unref (border_node); } /* KEEP IN SYNC WITH GTK_TREE_VIEW_BIN_EXPOSE */