summaryrefslogtreecommitdiff
path: root/src/Fl_Choice.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-09-24 13:35:23 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-09-24 13:35:23 +0000
commitb91935040a449a4a378d21907855479751a136cd (patch)
tree0a250f46587a1dc50cab5c5c58cec8ef80b5ee8a /src/Fl_Choice.cxx
parenta4c2cbd49a5cbba195cd66f4dffd4b621c6b4016 (diff)
Flip the color of Fl_Choice to FL_BACKGROUND2_COLOR when there is no
scheme so the menu uses the same color as the background. Add -Dname[=value] documentation to fltk-config man page. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Choice.cxx')
-rw-r--r--src/Fl_Choice.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx
index e44fd624e..f9eabde20 100644
--- a/src/Fl_Choice.cxx
+++ b/src/Fl_Choice.cxx
@@ -149,7 +149,16 @@ int Fl_Choice::handle(int e) {
case FL_PUSH:
if (Fl::visible_focus()) Fl::focus(this);
J1:
- v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
+ if (Fl::scheme()) {
+ v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
+ } else {
+ // In order to preserve the old look-n-feel of "white" menus,
+ // temporarily override the color() of this widget...
+ Fl_Color c = color();
+ color(FL_BACKGROUND2_COLOR);
+ v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
+ color(c);
+ }
if (!v || v->submenu()) return 1;
if (v != mvalue()) redraw();
picked(v);