diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-16 16:43:41 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-16 16:43:41 +0000 |
| commit | d7ee0df84ca8d0e1694dbc1d700b274b69fa64c5 (patch) | |
| tree | 56a6387c39ccc7f700f18523c2520cdee199e18b /src/Fl_Light_Button.cxx | |
| parent | 9ed48bd74a12e4fbe875ac6a10d208f9f6e29f92 (diff) | |
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
Diffstat (limited to 'src/Fl_Light_Button.cxx')
| -rw-r--r-- | src/Fl_Light_Button.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Fl_Light_Button.cxx b/src/Fl_Light_Button.cxx index d966f733d..0bfd67da5 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.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() { 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) } // -// 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 $". // |
