Bullet size should take into account the font of the immediately following content.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-12-23 15:57:45 +00:00
parent 7947a11dad
commit e3eac0ff7f

View File

@@ -3017,6 +3017,16 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
wxTextAttrEx bulletAttr(GetCombinedAttributes());
// Combine with the font of the first piece of content, if one is specified
if (GetChildren().GetCount() > 0)
{
wxRichTextObject* firstObj = (wxRichTextObject*) GetChildren().GetFirst()->GetData();
if (firstObj->GetAttributes().HasFont())
{
wxRichTextApplyStyle(bulletAttr, firstObj->GetAttributes());
}
}
// Get line height from first line, if any
wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : (wxRichTextLine*) NULL;