Use SHIFT to accelerate scrolling via the bar arrows.
This commit is contained in:
@@ -701,19 +701,24 @@ BScrollBar::MouseDown(BPoint where)
|
|||||||
|
|
||||||
// hit test for arrows or empty area
|
// hit test for arrows or empty area
|
||||||
float scrollValue = 0.0;
|
float scrollValue = 0.0;
|
||||||
|
|
||||||
|
// pressing the shift key scrolls faster
|
||||||
|
float buttonStepSize
|
||||||
|
= (modifiers() & B_SHIFT_KEY) != 0 ? fLargeStep : fSmallStep;
|
||||||
|
|
||||||
fPrivateData->fButtonDown = _ButtonFor(where);
|
fPrivateData->fButtonDown = _ButtonFor(where);
|
||||||
switch (fPrivateData->fButtonDown) {
|
switch (fPrivateData->fButtonDown) {
|
||||||
case ARROW1:
|
case ARROW1:
|
||||||
scrollValue = -fSmallStep;
|
scrollValue = -buttonStepSize;
|
||||||
break;
|
break;
|
||||||
case ARROW2:
|
case ARROW2:
|
||||||
scrollValue = fSmallStep;
|
scrollValue = buttonStepSize;
|
||||||
break;
|
break;
|
||||||
case ARROW3:
|
case ARROW3:
|
||||||
scrollValue = -fSmallStep;
|
scrollValue = -buttonStepSize;
|
||||||
break;
|
break;
|
||||||
case ARROW4:
|
case ARROW4:
|
||||||
scrollValue = fSmallStep;
|
scrollValue = buttonStepSize;
|
||||||
break;
|
break;
|
||||||
case NOARROW:
|
case NOARROW:
|
||||||
// we hit the empty area, figure out which side of the thumb
|
// we hit the empty area, figure out which side of the thumb
|
||||||
|
|||||||
Reference in New Issue
Block a user