applied patch for calculating the tree items size with non default font (patch 520965)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
788519c605
commit
40e7f56c71
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user