BView: ScrollWithMouseWheelDelta return status code
This commit is contained in:
parent
b2404e2a39
commit
ab5c74422e
@ -607,7 +607,7 @@ protected:
|
||||
|
||||
virtual void LayoutChanged();
|
||||
|
||||
void ScrollWithMouseWheelDelta(BScrollBar*, float);
|
||||
status_t ScrollWithMouseWheelDelta(BScrollBar*, float);
|
||||
|
||||
private:
|
||||
void _Layout(bool force, BLayoutContext* context);
|
||||
|
@ -5717,11 +5717,11 @@ BView::_SwitchServerCurrentView() const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
status_t
|
||||
BView::ScrollWithMouseWheelDelta(BScrollBar* scrollBar, float delta)
|
||||
{
|
||||
if (scrollBar == NULL || delta == 0.0f)
|
||||
return;
|
||||
return B_BAD_VALUE;
|
||||
|
||||
float smallStep;
|
||||
float largeStep;
|
||||
@ -5731,6 +5731,8 @@ BView::ScrollWithMouseWheelDelta(BScrollBar* scrollBar, float delta)
|
||||
// by other desktop environments).
|
||||
delta *= (modifiers() & B_SHIFT_KEY) != 0 ? largeStep : smallStep;
|
||||
scrollBar->SetValue(scrollBar->Value() + delta);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user