* Combine the two calls to ScrollBy into one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28405 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1085,14 +1085,20 @@ BContainerWindow::FrameResized(float, float)
|
||||
|
||||
// scroll when the size augmented, there is a negative offset
|
||||
// and we have resized over the bottom right corner of the extent
|
||||
BPoint scroll(B_ORIGIN);
|
||||
if (offsetX < 0 && PoseView()->Bounds().right > extent.right
|
||||
&& Bounds().Width() > fPreviousBounds.Width())
|
||||
PoseView()->ScrollBy(max_c(fPreviousBounds.Width() - Bounds().Width(), offsetX), 0);
|
||||
scroll.x =
|
||||
max_c(fPreviousBounds.Width() - Bounds().Width(), offsetX);
|
||||
|
||||
if (offsetY < 0 && PoseView()->Bounds().bottom > extent.bottom
|
||||
&& Bounds().Height() > fPreviousBounds.Height())
|
||||
PoseView()->ScrollBy(0, max_c(fPreviousBounds.Height() - Bounds().Height(), offsetY));
|
||||
scroll.y =
|
||||
max_c(fPreviousBounds.Height() - Bounds().Height(), offsetY);
|
||||
|
||||
if (scroll != B_ORIGIN)
|
||||
PoseView()->ScrollBy(scroll.x, scroll.y);
|
||||
|
||||
PoseView()->UpdateScrollRange();
|
||||
PoseView()->ResetPosePlacementHint();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user