diff options
author | Benjamin Otte <otte@redhat.com> | 2021-04-01 16:20:32 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-04-01 16:37:43 +0200 |
commit | 05e4cd1579c7fee0f78c0206122d8842c2bc1ec8 (patch) | |
tree | c0df6cb643d679fe600d0e6cf3c3498ecc648216 | |
parent | e7dc82fa32f9c115607f1f5d5e7ee9a7ee81e3de (diff) | |
download | gtk+-05e4cd1579c7fee0f78c0206122d8842c2bc1ec8.tar.gz |
snapshot: scale border widths when appending border nodes
Found by Matthias on IRC while arguing about GtkSnapshot being too
complicated.
-rw-r--r-- | gtk/gtksnapshot.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index e118031192..577565d21a 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -2448,7 +2448,14 @@ gtk_snapshot_append_border (GtkSnapshot *snapshot, gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy); gsk_rounded_rect_scale_affine (&real_outline, outline, scale_x, scale_y, dx, dy); - node = gsk_border_node_new (&real_outline, border_width, border_color); + node = gsk_border_node_new (&real_outline, + (float[4]) { + border_width[0] * scale_y, + border_width[1] * scale_x, + border_width[2] * scale_y, + border_width[3] * scale_x, + }, + border_color); gtk_snapshot_append_node_internal (snapshot, node); } |