diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-01-14 17:17:09 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-01-14 17:17:09 +0100 |
| commit | ab58971bcf9cedee6ecd131ca032087ff7d1623c (patch) | |
| tree | 39f102b41d07db356b4de105ccdb4b3191c451c2 /src/Fl_Tabs.cxx | |
| parent | c45bf57c8fcaf9c18f52f9d91dc97527e74d3d42 (diff) | |
Improve focus box drawing and documentation
Add new method
Fl_Widget::draw_focus(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color bg)
... with background color for correct contrast testing (in Fl_Tabs)
Draw the focus box of the "tabs" of Fl_Tabs widgets with the correct
boxtype and background color.
Make 'unsigned int visible_focus()' const so it can be used in 'const'
methods.
Do not draw the focus box if the per-widget focus box option is off.
Diffstat (limited to 'src/Fl_Tabs.cxx')
| -rw-r--r-- | src/Fl_Tabs.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 4c83b6476..9b626456b 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -417,7 +417,7 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) { o->draw_label(x1, y() + yofs, W, H - yofs, tab_align()); if (Fl::focus() == this && o->visible()) - draw_focus(box(), x1, y(), W, H); + draw_focus(bt, x1, y(), W, H, bc); fl_pop_clip(); } else { @@ -435,7 +435,7 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) { o->draw_label(x1, y() + h() - H, W, H - yofs, tab_align()); if (Fl::focus() == this && o->visible()) - draw_focus(box(), x1, y() + h() - H, W, H); + draw_focus(bt, x1, y() + h() - H, W, H, bc); fl_pop_clip(); } |
