implement default width for toolbar lables (from trunk r60199)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -555,6 +555,12 @@ wxSize wxAuiDefaultToolBarArt::GetLabelSize(
|
|||||||
// get item's width
|
// get item's width
|
||||||
width = item.GetMinSize().GetWidth();
|
width = item.GetMinSize().GetWidth();
|
||||||
|
|
||||||
|
if (width == -1)
|
||||||
|
{
|
||||||
|
// no width specified, measure the text ourselves
|
||||||
|
width = dc.GetTextExtent(item.GetLabel()).GetX();
|
||||||
|
}
|
||||||
|
|
||||||
return wxSize(width, height);
|
return wxSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user