mirror of https://github.com/fltk/fltk
Drawing artifact with round check buttons in menu under Cairo (#792)
This commit is contained in:
parent
c274ae1365
commit
6958e5d615
|
@ -232,7 +232,9 @@ static void gtk_round_up_box(int x, int y, int w, int h, Fl_Color c) {
|
|||
|
||||
static void gtk_round_down_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
gtk_color(c);
|
||||
fl_antialias(0); // fix for issue #792
|
||||
draw(FILL, x, y, w, h, 2);
|
||||
fl_antialias(1); // fix for issue #792
|
||||
|
||||
gtk_color(fl_color_average(FL_WHITE, c, 0.1f));
|
||||
draw(LOWER_RIGHT, x+1, y, w-2, h, 2);
|
||||
|
|
|
@ -217,9 +217,13 @@ static void _oxy_rounded_box_(int x, int y, int w, int h, Fl_Color bg) {
|
|||
fl_pie(x + w - h, y, h, h, 0.0, 90.0); // top-left quarter of circle
|
||||
fl_pie(x + w - h, y, h, h, 270.0, 360.0); // bottom-left quarter of circle
|
||||
} else {
|
||||
fl_antialias(0); // fix for issue #792
|
||||
fl_pie(x, y, w, w, 0.0, 180.0); // top half of circle
|
||||
fl_antialias(1); // fix for issue #792
|
||||
fl_rectf(x, y + w / 2, w, h - w); // rectangle between top and bottom half-circle
|
||||
fl_antialias(0); // fix for issue #792
|
||||
fl_pie(x, y + h - w, w, w, 180.0, 360.0); // bottom half of circle
|
||||
fl_antialias(1); // fix for issue #792
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,9 @@ extern const uchar* fl_gray_ramp();
|
|||
|
||||
void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
|
||||
const uchar *g = fl_gray_ramp();
|
||||
fl_antialias(0); // fix for issue #792
|
||||
draw(FILL, x, y, w, h, 2, Fl::box_color(bgcolor));
|
||||
fl_antialias(1); // fix for issue #792
|
||||
draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'N']);
|
||||
draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'H']);
|
||||
draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g[(int)'N']);
|
||||
|
|
Loading…
Reference in New Issue