summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-03-25 22:11:52 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-03-25 22:11:52 +0000
commit887fe14a2bc6b2919aeac6065b6628cd5f701235 (patch)
treeb16c84225ea4bbc7406ec1bd3a6ccc2392189bc2
parentb6c5ed9c3332ea7d0a461f390bb81595ddceed6d (diff)
Fix Fl_Choice drawing bugs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_Choice.cxx6
-rw-r--r--src/Fl_Menu.cxx8
3 files changed, 10 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index e228d6293..d361f5fbd 100644
--- a/CHANGES
+++ b/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
diff --git a/src/Fl_Choice.cxx b/src/Fl_Choice.cxx
index 5b76867b1..8aca736ef 100644
--- a/src/Fl_Choice.cxx
+++ b/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).
//
@@ -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 $".
//
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 04989f8f4..b6d33ed24 100644
--- a/src/Fl_Menu.cxx
+++ b/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).
//
@@ -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 $".
//