Also scroll by a small step, when using the menuscrollers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32923 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -416,17 +416,22 @@ BMenuWindow::_Scroll(const BPoint& where)
|
|||||||
ASSERT((fUpperScroller != NULL));
|
ASSERT((fUpperScroller != NULL));
|
||||||
|
|
||||||
const BPoint cursor = ConvertFromScreen(where);
|
const BPoint cursor = ConvertFromScreen(where);
|
||||||
|
const BRect &lowerFrame = fLowerScroller->Frame();
|
||||||
|
const BRect &upperFrame = fUpperScroller->Frame();
|
||||||
|
|
||||||
BRect lowerFrame = fLowerScroller->Frame();
|
int32 delta = 0;
|
||||||
BRect upperFrame = fUpperScroller->Frame();
|
|
||||||
|
|
||||||
if (fLowerScroller->IsEnabled() && lowerFrame.Contains(cursor))
|
if (fLowerScroller->IsEnabled() && lowerFrame.Contains(cursor))
|
||||||
_ScrollBy(1);
|
delta = 1;
|
||||||
else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor))
|
else if (fUpperScroller->IsEnabled() && upperFrame.Contains(cursor))
|
||||||
_ScrollBy(-1);
|
delta = -1;
|
||||||
else
|
|
||||||
|
if (delta == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
float smallStep;
|
||||||
|
GetSteps(&smallStep, NULL);
|
||||||
|
_ScrollBy(smallStep * delta);
|
||||||
|
|
||||||
snooze(5000);
|
snooze(5000);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user