git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36771 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2010-05-09 04:23:04 +00:00
parent 4cc05f8e10
commit 56ec6eae8e
@@ -92,8 +92,11 @@ TouchpadView::MouseUp(BPoint point)
fXTracking = false; fXTracking = false;
fYTracking = false; fYTracking = false;
const float kSoftScrollLimit = 0.7;
int32 result = 0; int32 result = 0;
if (GetRightScrollRatio() > 0.7 || GetBottomScrollRatio() > 0.7) { if (GetRightScrollRatio() > kSoftScrollLimit
|| GetBottomScrollRatio() > kSoftScrollLimit) {
BAlert* alert = new BAlert("ReallyChangeScrollArea", BAlert* alert = new BAlert("ReallyChangeScrollArea",
"The new scroll area is very large and may impede " "The new scroll area is very large and may impede "
"normal mouse operation. Do you really want to change" "normal mouse operation. Do you really want to change"
@@ -105,7 +108,9 @@ TouchpadView::MouseUp(BPoint point)
BMessage msg(SCROLL_AREA_CHANGED); BMessage msg(SCROLL_AREA_CHANGED);
Invoke(&msg); Invoke(&msg);
} else { } else {
if (GetRightScrollRatio() > kSoftScrollLimit)
fXScrollRange = fOldXScrollRange; fXScrollRange = fOldXScrollRange;
if (GetBottomScrollRatio() > kSoftScrollLimit)
fYScrollRange = fOldYScrollRange; fYScrollRange = fOldYScrollRange;
DrawSliders(); DrawSliders();
} }