From: Julian Smart Date: Sat, 23 Dec 2006 15:57:45 +0000 (+0000) Subject: Bullet size should take into account the font of the immediately following content. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e3eac0ff7f830c14b69a25e3dc28ad5e27da2716 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 --- diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 8d7b93134c..dc91157cc3 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -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;