Fixed position of menu titles (STR #794)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2005-04-10 18:49:43 +00:00
parent 9edf9a743e
commit ba3bde19c5
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
- Fixed position of menu titles (STR #794)
- Added missing Fl_Window::copy_label() method.
- Fixed wrong tooltip in fluid (STR #784)
- Added zlib path to fluid (STR #783)

View File

@ -240,6 +240,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
: Fl_Menu_Window(X, Y, Wp, Hp, 0)
{
int scr_x, scr_y, scr_w, scr_h;
int tx = X, ty = Y;
Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
if (!right_edge || right_edge > scr_x+scr_w) right_edge = scr_x+scr_w;
@ -310,7 +311,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
if (t) {
int dy = menubar_title ? Fl::box_dy(button->box())+1 : 2;
int ht = menubar_title ? button->h()-dy*2 : Htitle+2*BW+3;
title = new menutitle(X, Y-ht-dy, Wtitle, ht, t);
title = new menutitle(tx, ty-ht-dy, Wtitle, ht, t);
} else
title = 0;
}