summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fl_round_box.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx
index d1ebdcb25..54c8ebb07 100644
--- a/src/fl_round_box.cxx
+++ b/src/fl_round_box.cxx
@@ -50,11 +50,17 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
f(x, y+h-d, d, d, w<=h ? 180 : 90, w<=h ? 360 : 270);
}
} else if (which == UPPER_LEFT) {
- f(x+w-d, y, d, d, 45, w<=h ? 180 : 90);
- f(x, y+h-d, d, d, w<=h ? 180 : 90, 225);
+ if (w == h) f(x, y, d, d, 45, 225);
+ else {
+ f(x+w-d, y, d, d, 45, w<=h ? 180 : 90);
+ f(x, y+h-d, d, d, w<=h ? 180 : 90, 225);
+ }
} else { // LOWER_RIGHT
- f(x, y+h-d, d, d, 225, w<=h ? 360 : 270);
- f(x+w-d, y, d, d, w<=h ? 360 : 270, 360+45);
+ if (w == h) f(x, y, d, d, 225, 405);
+ else {
+ f(x, y+h-d, d, d, 225, w<=h ? 360 : 270);
+ f(x+w-d, y, d, d, w<=h ? 360 : 270, 360+45);
+ }
}
if (which == FILL) {
if (w < h)