summaryrefslogtreecommitdiff
path: root/src/Fl_Choice.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-03-07 08:51:44 +0000
committerBill Spitzak <spitzak@gmail.com>1999-03-07 08:51:44 +0000
commit51d37642ba4f9071ac178328cec7d421d4724187 (patch)
tree6ac5e6ad6e0b210b2b8bf32168752787bdb46db4 /src/Fl_Choice.cxx
parent6c793587e3305a4de1a080bb5663a356392c1075 (diff)
Contributed code for more accurate item_height() in Fl_Browser.
Fixed display of Fl_Choice yet again Tried to remove warning egcs warning messages from Fl_Color_Chooser Fl_Value_Input updates without user having to type Enter git-svn-id: file:///fltk/svn/fltk/trunk@374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Choice.cxx')
-rw-r--r--src/Fl_Choice.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx
index da8f0950c..f51a57131 100644
--- a/src/Fl_Choice.cxx
+++ b/src/Fl_Choice.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Choice.cxx,v 1.9 1999/02/23 14:01:17 mike Exp $"
+// "$Id: Fl_Choice.cxx,v 1.10 1999/03/07 08:51:42 bill Exp $"
//
// Choice widget for the Fast Light Tool Kit (FLTK).
//
@@ -38,12 +38,14 @@ void Fl_Choice::draw() {
if (box() == FL_FLAT_BOX) return; // for XForms compatability
int H = labelsize()/2+1;
draw_box(FL_THIN_UP_BOX,x()+w()-3*H,y()+(h()-H)/2,2*H,H,color());
- fl_font(textfont(),textsize());
- fl_color(active_r() ? textcolor() : inactive(textcolor()));
- fl_draw_shortcut = 2; // hack value to make '&' disappear
- int BW = Fl::box_dx(box());
- if (mvalue()) mvalue()->draw( x()+BW+3, y(), w()-2*BW-2-3*H, h(), this);
- fl_draw_shortcut = 0;
+ if (mvalue()) {
+ Fl_Menu_Item m = *mvalue();
+ if (active_r()) m.activate(); else m.deactivate();
+ fl_draw_shortcut = 2; // hack value to make '&' disappear
+ int BW = Fl::box_dx(box());
+ m.draw( x()+BW+3, y(), w()-2*BW-2-3*H, h(), this);
+ fl_draw_shortcut = 0;
+ }
draw_label();
}
@@ -86,5 +88,5 @@ int Fl_Choice::handle(int e) {
}
//
-// End of "$Id: Fl_Choice.cxx,v 1.9 1999/02/23 14:01:17 mike Exp $".
+// End of "$Id: Fl_Choice.cxx,v 1.10 1999/03/07 08:51:42 bill Exp $".
//