diff options
author | Benjamin Otte <otte@redhat.com> | 2023-05-07 03:40:44 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-05-17 02:25:32 +0200 |
commit | fb3f4a2f279dbbbf37d046a39d9166ba0aa99eef (patch) | |
tree | 9827b3a53d15b42462bbcc2d09066f06c100fb2d | |
parent | 17ab6203520a8cfde318e2fa28b96ce3e76e874b (diff) | |
download | gtk+-fb3f4a2f279dbbbf37d046a39d9166ba0aa99eef.tar.gz |
vulkan: Don't round corners when growing rounded rect
If the corner is set to 0, keep it there.
-rw-r--r-- | gsk/vulkan/resources/rounded-rect.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gsk/vulkan/resources/rounded-rect.glsl b/gsk/vulkan/resources/rounded-rect.glsl index 5ee5dfd2fa..38e8cad941 100644 --- a/gsk/vulkan/resources/rounded-rect.glsl +++ b/gsk/vulkan/resources/rounded-rect.glsl @@ -46,8 +46,8 @@ RoundedRect rounded_rect_shrink (RoundedRect r, vec4 amount) { vec4 new_bounds = r.bounds + vec4(1.0,1.0,-1.0,-1.0) * amount.wxyz; - vec4 new_widths = max (r.corner_widths - amount.wyyw, 0.0); - vec4 new_heights = max (r.corner_heights - amount.xxzz, 0.0); + vec4 new_widths = max (r.corner_widths - sign (r.corner_widths) * amount.wyyw, 0.0); + vec4 new_heights = max (r.corner_heights - sign (r.corner_heights) * amount.xxzz, 0.0); return RoundedRect (new_bounds, new_widths, new_heights); } |