]> git.saurik.com Git - wxWidgets.git/commitdiff
Bullet size should take into account the font of the immediately following content.
authorJulian Smart <julian@anthemion.co.uk>
Sat, 23 Dec 2006 15:57:45 +0000 (15:57 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 23 Dec 2006 15:57:45 +0000 (15:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 8d7b93134cfbf6854afa25cde13dd12832e5cc92..dc91157cc32f6d67fe0c60fa9182a9111b59b43b 100644 (file)
@@ -3017,6 +3017,16 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
 
             wxTextAttrEx bulletAttr(GetCombinedAttributes());
 
 
             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;
 
             // Get line height from first line, if any
             wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : (wxRichTextLine*) NULL;