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