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
This commit is contained in:
parent
9663eaa1c4
commit
a4c2cbd49a
@ -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
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user