diff options
| author | Matthias Melcher <git@matthiasm.com> | 2019-02-02 18:36:44 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2019-02-02 18:36:44 +0100 |
| commit | 5062b5a01041772e123f30b9e65de95d82d865a7 (patch) | |
| tree | 718e6e328e86d6a9081fd35440bc63cbc9f243b2 | |
| parent | 452a410a3ea02f58930c4b3cc5a04bbb6b3e7070 (diff) | |
Fixed pulldown menu position when at the bottom of the screen (STR #2880).
| -rw-r--r-- | CHANGES.txt | 1 | ||||
| -rw-r--r-- | src/Fl_Menu.cxx | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index e399ff026..2fa411fd6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -145,6 +145,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2019 Bug Fixes - (add new items here) + - Fixed pulldown menu position when at the bottom of the screen (STR #2880). - Fixed missing item handling in Fl_Chekc_Browser (STR #3480). - Fixed Delete key in Fl_Input deleting entire widgets in Fluid (STR #2841). - Reorganized Fluid Template feature (STR #3336). diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 51f6ce15a..af8e2f748 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -400,6 +400,13 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, // draw the menu to the right Y = Y-h()+itemheight+Fl::box_dy(box()); } + if (t) { + if (menubar_title) { + Y = Y + Fl::menu_linespacing() - Fl::box_dw(button->box()); + } else { + Y += 2*Htitle+2*BW+3; + } + } } } if (m) y(Y); else {y(Y-2); w(1); h(1);} |
