From ba3bde19c53daa277f566cb7d5114b374605bcb2 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 10 Apr 2005 18:49:43 +0000 Subject: Fixed position of menu titles (STR #794) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + src/Fl_Menu.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index a36c6b3bf..c38c793a0 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index a88707f14..0fcb94362 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -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; } -- cgit v1.2.3