Browse Source

Fix radio button fix (was changing d and W, but they are used below;

now use copies of d and W...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1854 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/168/head
Michael R Sweet 24 years ago
parent
commit
d7ee0df84c
  1. 16
      src/Fl_Light_Button.cxx

16
src/Fl_Light_Button.cxx

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
//
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.8 2001/12/16 13:05:39 easysw Exp $"
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.9 2001/12/16 16:43:41 easysw Exp $"
//
// Lighted button widget for the Fast Light Tool Kit (FLTK).
//
@ -73,14 +73,14 @@ void Fl_Light_Button::draw() { @@ -73,14 +73,14 @@ void Fl_Light_Button::draw() {
draw_box(down_box(), x()+d, y()+d+1, W, W, FL_WHITE);
if (value()) {
fl_color(col);
W -= Fl::box_dw(down_box()) + 3;
d += Fl::box_dx(down_box()) + 1;
if (W > 4) {
fl_pie(x() + d, y() + d, W, W + 1, 0.0, 360.0);
int tW = W - Fl::box_dw(down_box()) - 3;
int td = d + Fl::box_dx(down_box()) + 1;
if (tW > 4) {
fl_pie(x() + td, y() + td, tW, tW + 1, 0.0, 360.0);
} else {
// Small circles don't draw well with some X servers...
fl_rectf(x() + d + 1, y() + d, 2, 4);
fl_rectf(x() + d, y() + d + 1, 4, 2);
fl_rectf(x() + td + 1, y() + td, 2, 4);
fl_rectf(x() + td, y() + td + 1, 4, 2);
}
}
break;
@ -118,5 +118,5 @@ Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char* l) @@ -118,5 +118,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.8 2001/12/16 13:05:39 easysw Exp $".
// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.9 2001/12/16 16:43:41 easysw Exp $".
//

Loading…
Cancel
Save