Add Albrecht's radio circle drawing fixes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-03 14:59:31 +00:00
parent 2f9a58d608
commit 9cc064677c
3 changed files with 16 additions and 12 deletions

View File

@ -1,11 +1,13 @@
CHANGES IN FLTK 1.1.0rc2
- Adjusted the size of the circle that is drawn inside
radio buttons to scale better for larger labels.
- FLUID was opening the display when it shouldn't have.
- Fl_File_Chooser.cxx defined the file chooser functions
again; they should only be defined in the header file.
- Wide arcs would draw with "teeth".
- The preferences demo included Fl/Fl_Preferences.H
instead of FL/Fl_Preferences.H.
- Fl_File_Chooser.cxx defined the file chooser functions
again; they should only be defined in the header file.
- FLUID was opening the display when it shouldn't have.
CHANGES IN FLTK 1.1.0rc1

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.16 2002/04/30 15:34:57 easysw Exp $"
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.17 2002/05/03 14:59:31 easysw Exp $"
//
// Lighted button widget for the Fast Light Tool Kit (FLTK).
//
@ -44,7 +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 (dy < 0) dy = 0; // neg. offset o.k. for vertical centering
if (down_box()) {
// draw other down_box() styles:
@ -70,9 +70,10 @@ void Fl_Light_Button::draw() {
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()) - 2;
int tdx = dx + Fl::box_dx(down_box()) + 1;
int tdy = dy + Fl::box_dy(down_box()) + 1;
int tW = (W - Fl::box_dw(down_box())) / 2 + 1;
if ((W - tW) & 1) tW++; // Make sure difference is even to center
int tdx = dx + (W - tW) / 2;
int tdy = dy + (W - tW) / 2;
switch (tW) {
// Larger circles draw fine...
@ -141,5 +142,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.16 2002/04/30 15:34:57 easysw Exp $".
// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.17 2002/05/03 14:59:31 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.11 2002/04/30 15:34:58 easysw Exp $"
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.12 2002/05/03 14:59:31 easysw Exp $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@ -166,7 +166,8 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
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) - 2;
int tW = (W - Fl::box_dw(FL_ROUND_DOWN_BOX)) / 2 + 1;
if ((W - tW) & 1) tW++; // Make sure difference is even to center
int td = Fl::box_dx(FL_ROUND_DOWN_BOX) + 1;
switch (tW) {
// Larger circles draw fine...
@ -774,5 +775,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
}
//
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.11 2002/04/30 15:34:58 easysw Exp $".
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.12 2002/05/03 14:59:31 easysw Exp $".
//