implement default width for toolbar labels

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2009-04-16 12:58:37 +00:00
parent 1b7a2f8c78
commit e787be7457

View File

@@ -539,7 +539,13 @@ wxSize wxAuiDefaultToolBarArt::GetLabelSize(
// get item's width
width = item.GetMinSize().GetWidth();
if (width == -1)
{
// no width specified, measure the text ourselves
width = dc.GetTextExtent(item.GetLabel()).GetX();
}
return wxSize(width, height);
}