From 1a135b04249a6747ba023af915b6586bef4b41fb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 19 Feb 1999 15:34:09 +0000 Subject: Updated Fl::x(), ::y(), ::w(), and ::h() to account for WIN32 trays. Updated menu code to account for tray locations. git-svn-id: file:///fltk/svn/fltk/trunk@307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Fl_Menu.cxx') diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 58048946c..9b14afdd4 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx,v 1.15 1999/01/29 07:52:21 bill Exp $" +// "$Id: Fl_Menu.cxx,v 1.16 1999/02/19 15:34:08 mike Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -272,9 +272,9 @@ void menuwindow::position(int X, int Y) { // scroll so item i is visible on screen void menuwindow::autoscroll(int i) { int Y = y()+Fl::box_dx(box())+2+i*itemheight; - if (Y <= 0) Y = -Y+10; + if (Y <= Fl::y()) Y = Fl::y()-Y+10; else { - Y = Y+itemheight-Fl::h(); + Y = Y+itemheight-Fl::h()-Fl::y(); if (Y < 0) return; Y = -Y-10; } @@ -710,5 +710,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.15 1999/01/29 07:52:21 bill Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.16 1999/02/19 15:34:08 mike Exp $". // -- cgit v1.2.3