BView: ScrollWithMouseWheelDelta return status code

This commit is contained in:
John Scipione
2014-03-07 19:11:44 -05:00
parent b2404e2a39
commit ab5c74422e
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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);
+4 -2
View File
@@ -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;
} }