Skip to content

Commit

Permalink
Fix Fl_Choice drawing bugs.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Mar 25, 2002
1 parent b6c5ed9 commit 887fe14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/Fl_Choice.cxx
@@ -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).
//
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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 $".
//
8 changes: 4 additions & 4 deletions src/Fl_Menu.cxx
@@ -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).
//
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -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));
}

Expand Down Expand Up @@ -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 $".
//

0 comments on commit 887fe14

Please sign in to comment.