diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-04-26 12:42:11 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-04-26 12:42:11 +0200 |
| commit | 281ec24c8f4b7daf7cc4e7c30b640cbe0b33d037 (patch) | |
| tree | 254e20596d544cb25d32ab2067d9e18afc4ac097 /src/Fl_Widget.cxx | |
| parent | 9a0d1f16d7b78a7e789c30728df79166b95da115 (diff) | |
Box types can now defined and draw their own focus frame, STR 2145, #659
Diffstat (limited to 'src/Fl_Widget.cxx')
| -rw-r--r-- | src/Fl_Widget.cxx | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index c5b59f5db..bf2ff03d0 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -213,25 +213,7 @@ Fl_Widget::~Fl_Widget() { void Fl_Widget::draw_focus(Fl_Boxtype bt, int X, int Y, int W, int H, Fl_Color bg) const { if (!Fl::visible_focus()) return; if (!visible_focus()) return; - switch (bt) { - case FL_DOWN_BOX: - case FL_DOWN_FRAME: - case FL_THIN_DOWN_BOX: - case FL_THIN_DOWN_FRAME: - X ++; - Y ++; - default: - break; - } - X += Fl::box_dx(bt); - Y += Fl::box_dy(bt); - W -= Fl::box_dw(bt)+1; - H -= Fl::box_dh(bt)+1; - - Fl_Color savecolor = fl_color(); - fl_color(fl_contrast(FL_BLACK, bg)); - fl_focus_rect(X, Y, W, H); - fl_color(savecolor); + fl_draw_box_focus(bt, X, Y, W, H, FL_BLACK, bg); } void Fl_Widget::activate() { |
