summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-29 19:27:51 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-29 19:27:51 +0000
commitb5a79264a101071af534b60b466d202edc6667bd (patch)
tree0d2289a8c598a57acfef46bce8721460236fe4e3
parent6bfe3e970a4774e868e2a6e4a03a9b964ae3bfac (diff)
Radio button drawing fixes from Albrecht Schlosser.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CREDITS1
-rw-r--r--README2
-rw-r--r--src/Fl_Light_Button.cxx9
-rw-r--r--src/Fl_Menu.cxx14
4 files changed, 14 insertions, 12 deletions
diff --git a/CREDITS b/CREDITS
index d0fbec6f9..1e3232e4e 100644
--- a/CREDITS
+++ b/CREDITS
@@ -37,5 +37,6 @@ OTHER CONTRIBUTORS
Alexander Mai
Alexander Rabi
James Roth
+ Albrecht Schlosser
Andrea Suatoni
Paul Sydney
diff --git a/README b/README
index 7ebd305bc..25b9d9f69 100644
--- a/README
+++ b/README
@@ -170,7 +170,7 @@ MESA
TRADEMARKS
Microsoft and Windows are registered trademarks of Microsoft
- Corportation. UNIX is a registered trademark of the X/Open
+ Corporation. UNIX is a registered trademark of the X/Open
Group, Inc. OpenGL is a registered trademark of Silicon
Graphics, Inc. MacOS is a registered trademark of Apple
Computers, Inc.
diff --git a/src/Fl_Light_Button.cxx b/src/Fl_Light_Button.cxx
index f23f7614e..986cbe8d0 100644
--- a/src/Fl_Light_Button.cxx
+++ b/src/Fl_Light_Button.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.14 2002/04/27 19:35:18 easysw Exp $"
+// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.15 2002/04/29 19:27:51 easysw Exp $"
//
// Lighted button widget for the Fast Light Tool Kit (FLTK).
//
@@ -44,6 +44,7 @@ void Fl_Light_Button::draw() {
W = labelsize();
dx = Fl::box_dx(box()) + 2;
dy = (h() - W) / 2;
+ if (dy < 0) dy = 0; // no negative values (?)
if (down_box()) {
// draw other down_box() styles:
@@ -66,7 +67,7 @@ void Fl_Light_Button::draw() {
case _FL_ROUND_DOWN_BOX :
case _FL_ROUND_UP_BOX :
// Radio button...
- draw_box(down_box(), x()+dx, y()+dy+1, W, W, FL_BACKGROUND2_COLOR);
+ draw_box(down_box(), x()+dx, y()+dy, W, W, FL_BACKGROUND2_COLOR);
if (value()) {
fl_color(col);
int tW = W - Fl::box_dw(down_box()) - 3;
@@ -74,7 +75,7 @@ void Fl_Light_Button::draw() {
int tdy = dy + Fl::box_dy(down_box()) + 1;
if (tW > 4) {
- fl_pie(x() + tdx, y() + tdy, tW, tW + 1, 0.0, 360.0);
+ fl_pie(x() + tdx, y() + tdy, tW, tW , 0.0, 360.0);
} else {
// Small circles don't draw well with some X servers...
fl_rectf(x() + tdx + 1, y() + tdy, 2, 4);
@@ -122,5 +123,5 @@ Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char* l)
}
//
-// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.14 2002/04/27 19:35:18 easysw Exp $".
+// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.15 2002/04/29 19:27:51 easysw Exp $".
//
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 465d01dff..ef6192173 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.9 2002/04/11 10:46:19 easysw Exp $"
+// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.10 2002/04/29 19:27:51 easysw Exp $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@@ -163,17 +163,17 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
int W = h - 2 * d;
if (flags & FL_MENU_RADIO) {
- fl_draw_box(FL_ROUND_DOWN_BOX, x+2, y+d+1, W, W, FL_BACKGROUND2_COLOR);
+ fl_draw_box(FL_ROUND_DOWN_BOX, x+2, y+d, W, W, FL_BACKGROUND2_COLOR);
if (value()) {
fl_color(labelcolor_);
int tW = W - Fl::box_dw(FL_ROUND_DOWN_BOX) - 3;
- int td = Fl::box_dx(FL_ROUND_DOWN_BOX) + 2;
+ int td = Fl::box_dx(FL_ROUND_DOWN_BOX) + 1;
if (tW > 4) {
- fl_pie(x + td + 1, y + td, tW, tW + 1, 0.0, 360.0);
+ fl_pie(x+2 + td , y + d + td, tW, tW , 0.0, 360.0);
} else {
// Small circles don't draw well with some X servers...
- fl_rectf(x + td + 2, y + td, 2, 4);
- fl_rectf(x + td + 1, y + td + 1, 4, 2);
+ fl_rectf(x + td + 3, y + d + td, 2, 4);
+ fl_rectf(x + td + 2, y + d + td + 1, 4, 2);
}
}
} else {
@@ -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.9 2002/04/11 10:46:19 easysw Exp $".
+// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.10 2002/04/29 19:27:51 easysw Exp $".
//