From 8e16286ebbe0eee3d8d04789514b712cd5ae61a2 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Sat, 7 Jan 2023 09:35:53 -0800 Subject: Fix Fl_Spinner draw problem - closes #638 --- src/Fl_Spinner.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Fl_Spinner.cxx b/src/Fl_Spinner.cxx index 7bc3bd5c4..3fa102d9c 100644 --- a/src/Fl_Spinner.cxx +++ b/src/Fl_Spinner.cxx @@ -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()); -- cgit v1.2.3