* 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:
@@ -842,11 +842,20 @@ BMenu::MessageReceived(BMessage* msg)
|
|||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
float largeStep;
|
||||||
float smallStep;
|
float smallStep;
|
||||||
window->GetSteps(&smallStep, NULL);
|
window->GetSteps(&smallStep, &largeStep);
|
||||||
window->TryScrollBy(deltaY * smallStep);
|
|
||||||
|
// 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BView::MessageReceived(msg);
|
BView::MessageReceived(msg);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user