summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-16 16:38:13 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-16 16:38:13 +0200
commit15fe9d98808065ab7a7d0659e8d44c7a999175e4 (patch)
tree944924f2fed2b4b9cbd310acf14dd11ef3bb4dfa /src
parent09e06dc7036a6fc3e5936f57ba40ba58955d05a5 (diff)
Fix Drawing artifact with radio buttons under Cairo (#792) - cont'd
Diffstat (limited to 'src')
-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)