|
|
Here is the code in function Fl_Menu_Item::draw() of src/Fl_Menu.cxx that sets the text and background colors to draw menu items. This code uses fl_contrast() twice which, I believe, is ultimately too much.
if (fl_contrast(r, color) != r) { // back compatibility boxtypes
if (selected == 2) { // menu title
r = color;
b = m ? m->box() : FL_UP_BOX;
} else {
r = (Fl_Color)(FL_COLOR_CUBE-1); // white
l.color = fl_contrast((Fl_Color)labelcolor_, r);
}
} else {
l.color = fl_contrast((Fl_Color)labelcolor_, r);
}
Replacing this by just
l.color = fl_contrast((Fl_Color)labelcolor_, r);
fixes the issue of Windows menu items, keeps the lighter selection hue used in Windows, and makes sure the text is drawn with enough contrast relatively to its background with a single fl_contrast() call.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/969/2097501133@github.com>
[ Direct Link to Message ] | |
|
| |