Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around.
This commit is contained in:
@@ -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 -
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user