Greatly improved scrolling, and simplified the code too. Now scrolling

is done from inside the BMenu::_track() function, and not inside Pulse() 
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-12-29 07:01:08 +00:00
parent 191732a41c
commit c733893846
3 changed files with 40 additions and 18 deletions
+10 -4
View File
@@ -1270,11 +1270,17 @@ BMenu::_track(int *action, bigtime_t trackTime, long start)
BPoint location;
ulong buttons;
GetMouse(&location, &buttons, true);
BMenuWindow *window(static_cast<BMenuWindow *>(Window()));
BPoint screenLocation = ConvertToScreen(location);
item = HitTestItems(location, B_ORIGIN);
if (item != NULL)
_UpdateStateOpenSelect(item, openTime, closeTime);
if (window->CheckForScrolling(screenLocation)) {
item = NULL;
} else {
item = HitTestItems(location, B_ORIGIN);
if (item != NULL)
_UpdateStateOpenSelect(item, openTime, closeTime);
}
// Track the submenu
if (OverSubmenu(fSelected, screenLocation)) {