Now BTextView::AutoResize() resizes also the textrect as it should
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16609 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4010,8 +4010,11 @@ BTextView::AutoResize(bool doredraw)
|
|||||||
for (int32 i = 0; i < CountLines(); i++)
|
for (int32 i = 0; i < CountLines(); i++)
|
||||||
width = max_c(width, LineWidth(i));
|
width = max_c(width, LineWidth(i));
|
||||||
|
|
||||||
|
float textRectPadding = Bounds().right - fTextRect.right;
|
||||||
BView *viewToResize = fContainerView != NULL ? fContainerView : this;
|
BView *viewToResize = fContainerView != NULL ? fContainerView : this;
|
||||||
viewToResize->ResizeTo(width, max_c(Bounds().Height(), TextHeight(0, CountLines())));
|
viewToResize->ResizeTo(width, max_c(Bounds().Height(), TextHeight(0, CountLines())));
|
||||||
|
|
||||||
|
fTextRect.right = Bounds().right - textRectPadding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user