summaryrefslogtreecommitdiff
path: root/gtk/gtkroundedbox.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-08-21 00:10:43 +0200
committerBenjamin Otte <otte@redhat.com>2014-08-21 00:54:07 +0200
commit67456304d43bc455a068c9e2755ef3af4da78426 (patch)
tree55dae4b4445c02560a6e9965e2f4a6059c15aedb /gtk/gtkroundedbox.c
parent1126a34353877a5d0bcf06067e6bf129b48632e8 (diff)
downloadgtk+-67456304d43bc455a068c9e2755ef3af4da78426.tar.gz
roundedbox: Only grow border-radius if there is one
This is relevant for shadow spread and goes in line with the web. Testcase included.
Diffstat (limited to 'gtk/gtkroundedbox.c')
-rw-r--r--gtk/gtkroundedbox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c
index c3e2650e4c..c89a1fd354 100644
--- a/gtk/gtkroundedbox.c
+++ b/gtk/gtkroundedbox.c
@@ -149,8 +149,10 @@ gtk_css_border_radius_grow (GtkRoundedBoxCorner *corner,
double horizontal,
double vertical)
{
- corner->horizontal += horizontal;
- corner->vertical += vertical;
+ if (corner->horizontal)
+ corner->horizontal += horizontal;
+ if (corner->vertical)
+ corner->vertical += vertical;
if (corner->horizontal <= 0 || corner->vertical <= 0)
{