HaikuDepot: Support wheel scrolling in featured packages

* Forward B_MOUSE_WHEEL_CHANGED to parent view from each package row view
 * Configure small/big steps on vertical scroll bar.
This commit is contained in:
Stephan Aßmus 2014-11-13 22:56:30 +01:00
parent 642c5de7a8
commit 8507d262d8

View File

@ -115,11 +115,13 @@ public:
virtual void MessageReceived(BMessage* message)
{
switch (message->what) {
case B_MOUSE_WHEEL_CHANGED:
Window()->PostMessage(message, Parent());
break;
case MSG_UPDATE_PACKAGE:
{
SetPackage(fPackageListener->Package());
break;
}
}
}
@ -266,6 +268,10 @@ FeaturedPackagesView::FeaturedPackagesView()
"featured packages scroll view", containerView,
0, false, true, B_FANCY_BORDER);
BScrollBar* scrollBar = scrollView->ScrollBar(B_VERTICAL);
if (scrollBar != NULL)
scrollBar->SetSteps(10.0f, 20.0f);
BLayoutBuilder::Group<>(this)
.Add(scrollView, 1.0f)
;