mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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
This commit is contained in:
@@ -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).
|
// 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);
|
draw_box(down_box(), x()+d, y()+d+1, W, W, FL_WHITE);
|
||||||
if (value()) {
|
if (value()) {
|
||||||
fl_color(col);
|
fl_color(col);
|
||||||
W -= Fl::box_dw(down_box()) + 3;
|
int tW = W - Fl::box_dw(down_box()) - 3;
|
||||||
d += Fl::box_dx(down_box()) + 1;
|
int td = d + Fl::box_dx(down_box()) + 1;
|
||||||
if (W > 4) {
|
if (tW > 4) {
|
||||||
fl_pie(x() + d, y() + d, W, W + 1, 0.0, 360.0);
|
fl_pie(x() + td, y() + td, tW, tW + 1, 0.0, 360.0);
|
||||||
} else {
|
} else {
|
||||||
// Small circles don't draw well with some X servers...
|
// Small circles don't draw well with some X servers...
|
||||||
fl_rectf(x() + d + 1, y() + d, 2, 4);
|
fl_rectf(x() + td + 1, y() + td, 2, 4);
|
||||||
fl_rectf(x() + d, y() + d + 1, 4, 2);
|
fl_rectf(x() + td, y() + td + 1, 4, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user