Radio button drawing fixes from Albrecht Schlosser.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
6bfe3e970a
commit
b5a79264a1
1
CREDITS
1
CREDITS
@ -37,5 +37,6 @@ OTHER CONTRIBUTORS
|
||||
Alexander Mai
|
||||
Alexander Rabi
|
||||
James Roth
|
||||
Albrecht Schlosser
|
||||
Andrea Suatoni
|
||||
Paul Sydney
|
||||
|
2
README
2
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.
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user