Fixed two bugs: 1. one doubled arrow scrolled in the wrong direction. 2. When the mouse exited the view while scrolling, the scrollbar would stopped scrolling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -100,7 +100,7 @@ public:
|
|||||||
delete fScrollRunner;
|
delete fScrollRunner;
|
||||||
fScrollRunner = NULL;
|
fScrollRunner = NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool fEnabled;
|
bool fEnabled;
|
||||||
|
|
||||||
// TODO: This should be a static, initialized by
|
// TODO: This should be a static, initialized by
|
||||||
@@ -536,9 +536,9 @@ BScrollBar::MouseDown(BPoint pt)
|
|||||||
if (buttonrect.Contains(pt)) {
|
if (buttonrect.Contains(pt)) {
|
||||||
fPrivateData->fButtonDown = ARROW3;
|
fPrivateData->fButtonDown = ARROW3;
|
||||||
fPrivateData->fArrowDown = B_RIGHT_ARROW;
|
fPrivateData->fArrowDown = B_RIGHT_ARROW;
|
||||||
SetValue(Value() + fSmallStep);
|
SetValue(Value() - fSmallStep);
|
||||||
|
|
||||||
fPrivateData->StartMessageRunner(this, fSmallStep);
|
fPrivateData->StartMessageRunner(this, -fSmallStep);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -597,18 +597,15 @@ BScrollBar::MouseMoved(BPoint pt, uint32 transit, const BMessage *msg)
|
|||||||
if (!fPrivateData->fEnabled)
|
if (!fPrivateData->fEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (transit == B_EXITED_VIEW || transit == B_OUTSIDE_VIEW)
|
|
||||||
MouseUp(fPrivateData->fMousePos);
|
|
||||||
|
|
||||||
if (fPrivateData->fTracking) {
|
if (fPrivateData->fTracking) {
|
||||||
float delta;
|
float delta;
|
||||||
if (fOrientation == B_VERTICAL) {
|
if (fOrientation == B_VERTICAL) {
|
||||||
if( (pt.y > fPrivateData->fThumbFrame.bottom && fValue == fMax) ||
|
if ((pt.y > fPrivateData->fThumbFrame.bottom && fValue == fMax) ||
|
||||||
(pt.y < fPrivateData->fThumbFrame.top && fValue == fMin) )
|
(pt.y < fPrivateData->fThumbFrame.top && fValue == fMin) )
|
||||||
return;
|
return;
|
||||||
delta = pt.y - fPrivateData->fMousePos.y;
|
delta = pt.y - fPrivateData->fMousePos.y;
|
||||||
} else {
|
} else {
|
||||||
if((pt.x > fPrivateData->fThumbFrame.right && fValue == fMax) ||
|
if ((pt.x > fPrivateData->fThumbFrame.right && fValue == fMax) ||
|
||||||
(pt.x < fPrivateData->fThumbFrame.left && fValue == fMin))
|
(pt.x < fPrivateData->fThumbFrame.left && fValue == fMin))
|
||||||
return;
|
return;
|
||||||
delta = pt.x - fPrivateData->fMousePos.x;
|
delta = pt.x - fPrivateData->fMousePos.x;
|
||||||
|
|||||||
Reference in New Issue
Block a user