BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4090,15 +4090,13 @@ BTextView::UpdateScrollbars()
|
||||
void
|
||||
BTextView::AutoResize(bool doredraw)
|
||||
{
|
||||
// TODO: What about fContainerView ? Should we resize it as well ?
|
||||
if (fResizable) {
|
||||
float width = 0;
|
||||
for (int32 i = 0; i < CountLines(); i++)
|
||||
width = max_c(width, LineWidth(i));
|
||||
|
||||
ResizeTo(width, max_c(Bounds().Height(), TextHeight(0, CountLines())));
|
||||
if (fContainerView)
|
||||
fContainerView->ResizeTo(Bounds().Width(), Bounds().Height());
|
||||
BView *viewToResize = fContainerView != NULL ? fContainerView : this;
|
||||
viewToResize->ResizeTo(width, max_c(Bounds().Height(), TextHeight(0, CountLines())));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user