Fix Fl_Choice drawing bugs.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-03-25 22:11:52 +00:00
parent b6c5ed9c33
commit 887fe14a2b
3 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.0b12
- Documentation updates.
- Fl_Choice didn't clip the current value properly - it
wasn't accounting for the box border width.
- The forms compatibility functions are now placed in a
"fltk_forms" library to match FLTK 2.0.
- Renamed down() and frame() to fl_down() and

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.6 2002/01/01 15:11:30 easysw Exp $"
// "$Id: Fl_Choice.cxx,v 1.10.2.5.2.7 2002/03/25 22:11:52 easysw Exp $"
//
// Choice widget for the Fast Light Tool Kit (FLTK).
//
@ -50,6 +50,8 @@ void Fl_Choice::draw() {
fl_color(active_r() ? labelcolor() : fl_inactive(labelcolor()));
fl_polygon(x1, y1, x1 + w1, y1 + w1, x1 + 2 * w1, y1);
W += 2 * dx;
if (mvalue()) {
Fl_Menu_Item m = *mvalue();
if (active_r()) m.activate(); else m.deactivate();
@ -117,5 +119,5 @@ int Fl_Choice::handle(int e) {
}
//
// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.6 2002/01/01 15:11:30 easysw Exp $".
// End of "$Id: Fl_Choice.cxx,v 1.10.2.5.2.7 2002/03/25 22:11:52 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.7 2002/02/20 13:02:27 easysw Exp $"
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.8 2002/03/25 22:11:52 easysw Exp $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@ -221,7 +221,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
} else {
box(FL_UP_BOX);
}
color(button ? button->color() : FL_GRAY);
color(button && !Fl::scheme() ? button->color() : FL_GRAY);
selected = -1;
{int j = 0;
if (m) for (const Fl_Menu_Item* m1=m; ; m1 = m1->next(), j++) {
@ -316,7 +316,7 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int erase) {
int h = itemheight - LEADING;
if (erase && n != selected) {
fl_color(button ? button->color() : FL_GRAY);
fl_color(button && !Fl::scheme() ? button->color() : FL_GRAY);
fl_rectf(x+1, y-(LEADING-2)/2, w-2, h+(LEADING-2));
}
@ -756,5 +756,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
}
//
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.7 2002/02/20 13:02:27 easysw Exp $".
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.8 2002/03/25 22:11:52 easysw Exp $".
//