diff options
| -rwxr-xr-x | fltk-config.in | 4 | ||||
| -rw-r--r-- | src/Fl_Choice.cxx | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/fltk-config.in b/fltk-config.in index 2d00f2a94..6ff22a9a7 100755 --- a/fltk-config.in +++ b/fltk-config.in @@ -118,6 +118,7 @@ Options telling what information we request: Option to compile and link an application: [-g] compile the program with debugging information + [-Dname[=value]] compile the program with the given define [--compile program.cxx] [--post program] " @@ -185,6 +186,9 @@ do -g) debug=-g ;; + -D*) + CXXFLAGS="$CXXFLAGS $1" + ;; --compile) compile=$2 post=$2 diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx index 8f47f32ac..e44fd624e 100644 --- a/src/Fl_Choice.cxx +++ b/src/Fl_Choice.cxx @@ -28,6 +28,7 @@ #include <FL/Fl.H> #include <FL/Fl_Choice.H> #include <FL/fl_draw.H> +#include "flstring.h" // Emulates the Forms choice widget. This is almost exactly the same // as an Fl_Menu_Button. The only difference is the appearance of the @@ -48,8 +49,23 @@ void Fl_Choice::draw() { draw_box(FL_UP_BOX, color()); fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor())); - fl_polygon(x1, y1 + 3, x1 + w1, y1 + w1 + 3, x1 + 2 * w1, y1 + 3); - fl_polygon(x1, y1 + 1, x1 + w1, y1 - w1 + 1, x1 + 2 * w1, y1 + 1); + if (!strcmp(Fl::scheme(), "plastic")) { + // Show larger up/down arrows... + fl_polygon(x1, y1 + 3, x1 + w1, y1 + w1 + 3, x1 + 2 * w1, y1 + 3); + fl_polygon(x1, y1 + 1, x1 + w1, y1 - w1 + 1, x1 + 2 * w1, y1 + 1); + } else { + // Show smaller up/down arrows with a divider... + x1 = x() + w() - 13 - dx; + y1 = y() + h() / 2; + fl_polygon(x1, y1 - 2, x1 + 3, y1 - 5, x1 + 6, y1 - 2); + fl_polygon(x1, y1 + 2, x1 + 3, y1 + 5, x1 + 6, y1 + 2); + + fl_color(fl_darker(color())); + fl_yxline(x1 - 7, y1 - 8, y1 + 8); + + fl_color(fl_lighter(color())); + fl_yxline(x1 - 6, y1 - 8, y1 + 8); + } } else { draw_box(FL_DOWN_BOX, FL_BACKGROUND2_COLOR); draw_box(FL_UP_BOX,X,Y,W,H,color()); |
