diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-10-13 12:49:26 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-10-13 12:49:26 +0200 |
| commit | b1321bb97e254a5aa4d5ed6eef03d89a3892d1f9 (patch) | |
| tree | f031953def82e39f6c2ef9af50576ed7df9cb19d /src/Fl_Menu.cxx | |
| parent | 0af27f6fda2479db5ebd27e22d68bd96ac7eb2da (diff) | |
#748: Adds option to choose menu window boxtype
...independently from the menu button or menu bar boxtype
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index a213978d3..271bcd50b 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -386,9 +386,12 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, if (m) m = m->first(); // find the first item that needs to be rendered drawn_selected = -1; if (button) { - box(button->box()); - // don't force a box type, but make sure that the background is redrawn - if (box() == FL_NO_BOX) box(FL_FLAT_BOX); + Fl_Boxtype b = button->menu_box(); + if (b==FL_NO_BOX) + b = button->box(); + if (b==FL_NO_BOX) + b = FL_FLAT_BOX; + box(b); } else { box(FL_UP_BOX); } |
