X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f0dd6b274870d22ce3b7307735a8d868e3a5035..9d2cef1c694eb0c34ae4b9c9bd7ab04e3255301d:/src/generic/treectlg.cpp?ds=inline diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 833404dd9f..590ca02113 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2896,7 +2896,10 @@ void wxGenericTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc ) wxCoord text_w = 0; wxCoord text_h = 0; - if (item->IsBold()) + wxTreeItemAttr *attr = item->GetAttributes(); + if ( attr && attr->HasFont() ) + dc.SetFont(attr->GetFont()); + else if ( item->IsBold() ) dc.SetFont(m_boldFont); dc.GetTextExtent( item->GetText(), &text_w, &text_h );