summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-09-24 04:39:55 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-09-24 04:39:55 +0000
commita4c2cbd49a5cbba195cd66f4dffd4b621c6b4016 (patch)
tree8f15c58a8129e7594b6b1e13b4f88a18287c66a7 /src
parent9663eaa1c42e760bb338457045e4a6f3243dd10e (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Choice.cxx20
1 files changed, 18 insertions, 2 deletions
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());