* Not sure why we are that generous (copying BView behaviour), but pressing
Alt, Option, or Control while scrolling the menu via the mouse wheel now scrolls page wise. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32581 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c9c3b32d3b
commit
d587e0fbfe
@ -842,11 +842,20 @@ BMenu::MessageReceived(BMessage* msg)
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
float largeStep;
|
||||
float smallStep;
|
||||
window->GetSteps(&smallStep, NULL);
|
||||
window->TryScrollBy(deltaY * smallStep);
|
||||
window->GetSteps(&smallStep, &largeStep);
|
||||
|
||||
// pressing the option/command/control key scrolls faster
|
||||
if (modifiers() & (B_OPTION_KEY | B_COMMAND_KEY | B_CONTROL_KEY))
|
||||
deltaY *= largeStep;
|
||||
else
|
||||
deltaY *= smallStep;
|
||||
|
||||
window->TryScrollBy(deltaY);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
BView::MessageReceived(msg);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user