From 15fe9d98808065ab7a7d0659e8d44c7a999175e4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 16 Oct 2023 16:38:13 +0200 Subject: Fix Drawing artifact with radio buttons under Cairo (#792) - cont'd --- src/fl_round_box.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit v1.2.3