BView: style fixes related to mouse scrolling
This commit is contained in:
parent
b7929c0574
commit
c4337a4324
@ -4405,22 +4405,24 @@ BView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
float deltaX = 0.0f, deltaY = 0.0f;
|
float deltaX = 0.0f;
|
||||||
|
float deltaY = 0.0f;
|
||||||
|
|
||||||
if (horizontal != NULL)
|
if (horizontal != NULL)
|
||||||
message->FindFloat("be:wheel_delta_x", &deltaX);
|
message->FindFloat("be:wheel_delta_x", &deltaX);
|
||||||
|
|
||||||
if (vertical != NULL)
|
if (vertical != NULL)
|
||||||
message->FindFloat("be:wheel_delta_y", &deltaY);
|
message->FindFloat("be:wheel_delta_y", &deltaY);
|
||||||
|
|
||||||
if (deltaX == 0.0f && deltaY == 0.0f)
|
if (deltaX == 0.0f && deltaY == 0.0f)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (horizontal != NULL) {
|
if (horizontal != NULL)
|
||||||
ScrollWithMouseWheelDelta(horizontal, deltaX);
|
ScrollWithMouseWheelDelta(horizontal, deltaX);
|
||||||
}
|
|
||||||
|
|
||||||
if (vertical != NULL) {
|
if (vertical != NULL)
|
||||||
ScrollWithMouseWheelDelta(vertical, deltaY);
|
ScrollWithMouseWheelDelta(vertical, deltaY);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5721,7 +5723,8 @@ BView::ScrollWithMouseWheelDelta(BScrollBar* scrollBar, float delta)
|
|||||||
if (scrollBar == NULL || delta == 0.0f)
|
if (scrollBar == NULL || delta == 0.0f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float smallStep, largeStep;
|
float smallStep;
|
||||||
|
float largeStep;
|
||||||
scrollBar->GetSteps(&smallStep, &largeStep);
|
scrollBar->GetSteps(&smallStep, &largeStep);
|
||||||
|
|
||||||
// pressing the shift key scrolls faster (following the pseudo-standard set
|
// pressing the shift key scrolls faster (following the pseudo-standard set
|
||||||
|
Loading…
Reference in New Issue
Block a user