From a4c2cbd49a5cbba195cd66f4dffd4b621c6b4016 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 24 Sep 2006 04:39:55 +0000 Subject: Tweak gtk+ drawing of Fl_Choice. Add support for "-Dname" option in fltk-config. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Choice.cxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src') 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 #include #include +#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()); -- cgit v1.2.3