summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2023-01-07 09:35:53 -0800
committerGreg Ercolano <erco@seriss.com>2023-01-07 09:35:53 -0800
commit8e16286ebbe0eee3d8d04789514b712cd5ae61a2 (patch)
tree1b988f0d2dff2bc7cd1a8706bfe70dea5d95d88a /src
parent18f2854656b9cc0277a0c881d4252a35e4c83f53 (diff)
Fix Fl_Spinner draw problem - closes #638
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Spinner.cxx12
1 files 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());