Author: AlbrechtS
Date: 2009-09-16 00:06:41 -0700 (Wed, 16 Sep 2009)
New Revision: 6873
Log:
Fixed Fl_Choice contrast with light-on-dark settings (STR #2219).
Patch provided by Aaron M. Ucko, thanks.
Modified:
branches/branch-1.3/CHANGES
branches/branch-1.3/src/Fl_Choice.cxx
Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2009-09-16 07:04:37 UTC (rev 6872)
+++ branches/branch-1.3/CHANGES 2009-09-16 07:06:41 UTC (rev 6873)
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
+ - Fixed Fl_Choice contrast with light-on-dark settings (STR #2219)
- Fixed X server "lock", if a modal dialog window is opened
while a menu is active (STR #1986)
- Updated mirror sites in documentation (STR #2220)
Modified: branches/branch-1.3/src/Fl_Choice.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Choice.cxx 2009-09-16 07:04:37 UTC (rev
6872)
+++ branches/branch-1.3/src/Fl_Choice.cxx 2009-09-16 07:06:41 UTC (rev
6873)
@@ -67,7 +67,11 @@
fl_yxline(x1 - 6, y1 - 8, y1 + 8);
}
} else {
- draw_box(FL_DOWN_BOX, FL_BACKGROUND2_COLOR);
+ if (fl_contrast(textcolor(), FL_BACKGROUND2_COLOR) == textcolor()) {
+ draw_box(FL_DOWN_BOX, FL_BACKGROUND2_COLOR);
+ } else {
+ draw_box(FL_DOWN_BOX, fl_lighter(color()));
+ }
draw_box(FL_UP_BOX,X,Y,W,H,color());
fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor()));
@@ -171,7 +175,8 @@
case FL_PUSH:
if (Fl::visible_focus()) Fl::focus(this);
J1:
- if (Fl::scheme()) {
+ if (Fl::scheme()
+ || fl_contrast(textcolor(), FL_BACKGROUND2_COLOR) != textcolor()) {
v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
} else {
// In order to preserve the old look-n-feel of "white" menus,
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit