diff --git a/CHANGES b/CHANGES index e5ab715b5..b663faa42 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,8 @@ CHANGES IN FLTK 1.1.2 text widgets. - Fl_Check_Browser didn't provide const char * add methods as documented. + - Fl_Check_Browser didn't draw the same style of check + marks at the other widgets. - Fl_Button, Fl_Choice, and Fl_Menu_Button incorrectly activated the button/menu when the spacebar was pressed in conjunction with shift, control, alt, or diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx index f520d637b..1a393a1d9 100644 --- a/src/Fl_Check_Browser.cxx +++ b/src/Fl_Check_Browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Check_Browser.cxx,v 1.1.2.5 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_Check_Browser.cxx,v 1.1.2.6 2002/11/14 21:25:13 easysw Exp $" // // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). // @@ -107,7 +107,7 @@ int Fl_Check_Browser::item_height(void *) const { return textsize() + 2; } -#define CHECK_SIZE 8 +#define CHECK_SIZE (textsize()-2) int Fl_Check_Browser::item_width(void *v) const { fl_font(textfont(), textsize()); @@ -126,8 +126,15 @@ void Fl_Check_Browser::item_draw(void *v, int X, int Y, int, int) const { fl_loop(X, cy, X, cy + CHECK_SIZE, X + CHECK_SIZE, cy + CHECK_SIZE, X + CHECK_SIZE, cy); if (i->checked) { - fl_line(X, cy, X + CHECK_SIZE, cy + CHECK_SIZE); - fl_line(X, cy + CHECK_SIZE, X + CHECK_SIZE, cy); + int tx = X + 3; + int tw = CHECK_SIZE - 4; + int d1 = tw/3; + int d2 = tw-d1; + int ty = cy + (CHECK_SIZE+d2)/2-d1-2; + for (int n = 0; n < 3; n++, ty++) { + fl_line(tx, ty, tx+d1, ty+d1); + fl_line(tx+d1, ty+d1, tx+tw-1, ty+d1-d2+1); + } } fl_font(textfont(), tsize); if (i->selected) { @@ -259,5 +266,5 @@ void Fl_Check_Browser::check_none() { // -// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.5 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.6 2002/11/14 21:25:13 easysw Exp $". //