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