From 21f50d63e6440f58af865849174a4639e6c6f0b6 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 3 Nov 2012 23:33:49 +0100 Subject: [PATCH] Use SHIFT to accelerate scrolling via the bar arrows. --- src/kits/interface/ScrollBar.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/ScrollBar.cpp b/src/kits/interface/ScrollBar.cpp index 540d8405c4..c12c5ab5b2 100644 --- a/src/kits/interface/ScrollBar.cpp +++ b/src/kits/interface/ScrollBar.cpp @@ -701,19 +701,24 @@ BScrollBar::MouseDown(BPoint where) // hit test for arrows or empty area float scrollValue = 0.0; + + // pressing the shift key scrolls faster + float buttonStepSize + = (modifiers() & B_SHIFT_KEY) != 0 ? fLargeStep : fSmallStep; + fPrivateData->fButtonDown = _ButtonFor(where); switch (fPrivateData->fButtonDown) { case ARROW1: - scrollValue = -fSmallStep; + scrollValue = -buttonStepSize; break; case ARROW2: - scrollValue = fSmallStep; + scrollValue = buttonStepSize; break; case ARROW3: - scrollValue = -fSmallStep; + scrollValue = -buttonStepSize; break; case ARROW4: - scrollValue = fSmallStep; + scrollValue = buttonStepSize; break; case NOARROW: // we hit the empty area, figure out which side of the thumb