summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-12-21 09:28:26 +0100
committerTimm Bäder <mail@baedert.org>2020-12-21 10:26:03 +0100
commit0b4ed8d7915bd3ddd23680c80643dbb5788d747a (patch)
tree11c4122cc160ba1f18f67cecc5f5310829915880
parentc34f98931e551b64141240820cd1eff218505b13 (diff)
downloadgtk+-0b4ed8d7915bd3ddd23680c80643dbb5788d747a.tar.gz
renderborder: Avoid 0 width outline color nodes
-rw-r--r--gtk/gtkrenderborder.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c
index 9ee5a62a9f..3031f26a6b 100644
--- a/gtk/gtkrenderborder.c
+++ b/gtk/gtkrenderborder.c
@@ -743,8 +743,12 @@ gtk_css_style_snapshot_outline (GtkCssBoxes *boxes,
if (gdk_rgba_is_clear (color))
return;
- border_style[1] = border_style[2] = border_style[3] = border_style[0];
border_width[0] = _gtk_css_number_value_get (outline->outline_width, 100);
+
+ if (G_APPROX_VALUE (border_width[0], 0, FLT_EPSILON))
+ return;
+
+ border_style[1] = border_style[2] = border_style[3] = border_style[0];
border_width[3] = border_width[2] = border_width[1] = border_width[0];
colors[0] = colors[1] = colors[2] = colors[3] = *color;