Browse Source

STR #1322: fixes wrong menutitle position for popup menus. This was originally another fix for pulldown menus (see STR #794, SVN 4259), but had an impact on popups. This fix should work well for both situations.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/168/head
Matthias Melcher 19 years ago
parent
commit
ec8ab0f22d
  1. 1
      CHANGES
  2. 10
      src/Fl_Menu.cxx

1
CHANGES

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.8 CHANGES IN FLTK 1.1.8
- Fixed position of popup menu titles (STR #1322)
- Showing any window will disable the current tooltip - Showing any window will disable the current tooltip
so it won't pop over menus (STR #1321) so it won't pop over menus (STR #1321)
- Updated documentation to reflect limitation of - Updated documentation to reflect limitation of

10
src/Fl_Menu.cxx

@ -328,9 +328,15 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
if (m) y(Y); else {y(Y-2); w(1); h(1);} if (m) y(Y); else {y(Y-2); w(1); h(1);}
if (t) { if (t) {
int dy = menubar_title ? Fl::box_dy(button->box())+1 : 2; if (menubar_title) {
int ht = menubar_title ? button->h()-dy*2 : Htitle+2*BW+3; int dy = Fl::box_dy(button->box())+1;
int ht = button->h()-dy*2;
title = new menutitle(tx, ty-ht-dy, Wtitle, ht, t); title = new menutitle(tx, ty-ht-dy, Wtitle, ht, t);
} else {
int dy = 2;
int ht = Htitle+2*BW+3;
title = new menutitle(X, Y-ht-dy, Wtitle, ht, t);
}
} else } else
title = 0; title = 0;
} }

Loading…
Cancel
Save