Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.

This commit is contained in:
Alex Wilson
2011-10-28 14:16:49 -06:00
parent 17499672a0
commit 61eb1f1d19
14 changed files with 83 additions and 100 deletions
+34 -33
View File
@@ -300,39 +300,6 @@ BScrollView::ResizeToPreferred()
}
void
BScrollView::InvalidateLayout(bool descendants)
{
BView::InvalidateLayout(descendants);
}
void
BScrollView::DoLayout()
{
if (!(Flags() & B_SUPPORTS_LAYOUT))
return;
// If the user set a layout, we let the base class version call its hook.
if (GetLayout()) {
BView::DoLayout();
return;
}
BRect innerFrame = _InnerFrame();
if (fTarget != NULL) {
fTarget->MoveTo(innerFrame.left, innerFrame.top);
fTarget->ResizeTo(innerFrame.Width(), innerFrame.Height());
//BLayoutUtils::AlignInFrame(fTarget, fTarget->Bounds());
}
_AlignScrollBars(fHorizontalScrollBar != NULL, fVerticalScrollBar != NULL,
innerFrame);
}
void
BScrollView::FrameMoved(BPoint position)
{
@@ -668,6 +635,40 @@ BScrollView::Perform(perform_code code, void* _data)
}
void
BScrollView::LayoutInvalidated(bool descendants)
{
}
void
BScrollView::DoLayout()
{
if (!(Flags() & B_SUPPORTS_LAYOUT))
return;
// If the user set a layout, we let the base class version call its hook.
if (GetLayout()) {
BView::DoLayout();
return;
}
BRect innerFrame = _InnerFrame();
if (fTarget != NULL) {
fTarget->MoveTo(innerFrame.left, innerFrame.top);
fTarget->ResizeTo(innerFrame.Width(), innerFrame.Height());
//BLayoutUtils::AlignInFrame(fTarget, fTarget->Bounds());
}
_AlignScrollBars(fHorizontalScrollBar != NULL, fVerticalScrollBar != NULL,
innerFrame);
}
// #pragma mark -