Fix Fl_Spinner draw problem - closes #638

This commit is contained in:
Greg Ercolano
2023-01-07 09:35:53 -08:00
parent 18f2854656
commit 8e16286ebb
+3 -9
View File
@@ -128,20 +128,14 @@ Fl_Spinner::Fl_Spinner(int X, int Y, int W, int H, const char *L)
}
void Fl_Spinner::draw() {
// let group draw itself; buttons are blank as they have no labels
Fl_Group::draw();
// draw the box and the input widget
draw_box();
((Fl_Widget&)input_).draw();
// draw the buttons and the up and down arrows as their "labels"
((Fl_Widget&)up_button_).draw();
// draw up/down arrows over the button's empty labels
Fl_Rect up(up_button_);
up.inset(up_button_.box());
fl_draw_arrow(up, FL_ARROW_SINGLE, FL_ORIENT_UP, labelcolor());
((Fl_Widget&)down_button_).draw();
Fl_Rect down(down_button_);
down.inset(down_button_.box());
fl_draw_arrow(down, FL_ARROW_SINGLE, FL_ORIENT_DOWN, labelcolor());