Add indents to maximum size to prevent problems with paragraph layout (fixes #13458).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4722,7 +4722,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, const wxRect& rect, int style)
|
|||||||
// this size. TODO: take into account line breaks.
|
// this size. TODO: take into account line breaks.
|
||||||
{
|
{
|
||||||
wxRect marginRect, borderRect, contentRect, paddingRect, outlineRect;
|
wxRect marginRect, borderRect, contentRect, paddingRect, outlineRect;
|
||||||
contentRect = wxRect(wxPoint(0, 0), wxSize(paraSize.x, currentPosition.y + spaceAfterPara));
|
contentRect = wxRect(wxPoint(0, 0), wxSize(paraSize.x + wxMax(leftIndent, leftIndent + leftSubIndent) + rightIndent, currentPosition.y + spaceAfterPara));
|
||||||
GetBoxRects(dc, buffer, GetAttributes(), marginRect, borderRect, contentRect, paddingRect, outlineRect);
|
GetBoxRects(dc, buffer, GetAttributes(), marginRect, borderRect, contentRect, paddingRect, outlineRect);
|
||||||
SetMaxSize(marginRect.GetSize());
|
SetMaxSize(marginRect.GetSize());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user