git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61000
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return false;
m_labelOrig = m_label = label ;
return false;
m_labelOrig = m_label = label ;
m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
- // passing the text in the param doesn't seem to work, so lets do if again
+ // passing the text in the param doesn't seem to work, so lets do it again
wxSize wxDisclosureTriangle::DoGetBestSize() const
{
wxSize wxDisclosureTriangle::DoGetBestSize() const
{
- return wxWindow::DoGetBestSize();
+ wxSize size = wxWindow::DoGetBestSize();
+
+ // under Carbon the base class GetBestSize() implementation doesn't seem to
+ // take the label into account at all, correct for it here
+#if wxOSX_USE_CARBON
+ size.x += GetTextExtent(GetLabel()).x;
+#endif // wxOSX_USE_CARBON
+
+ return size;