If above the scroll limit, scroll to limit.
This case happens when you are scrolled to the end of the list and you do an action that causes the view to shrink but not enough for the scroll arrows to be detached such as remove a team or unexpand an application. Before it would keep you where you were showing an extra grey area, now it scrolls you back to the new scroll limit.
This commit is contained in:
@@ -451,6 +451,17 @@ TInlineScrollView::AttachScrollers()
|
||||
fScrollLimit = fTarget->Bounds().Width()
|
||||
- (frame.Width() - 2 * kScrollerDimension);
|
||||
}
|
||||
|
||||
if (fScrollValue > fScrollLimit) {
|
||||
// If scroll value is above limit scroll back
|
||||
float delta = fScrollLimit - fScrollValue;
|
||||
if (fOrientation == B_VERTICAL)
|
||||
fTarget->ScrollBy(0, delta);
|
||||
else
|
||||
fTarget->ScrollBy(delta, 0);
|
||||
|
||||
fScrollValue = fScrollLimit;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user