X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ca0d8122ab2ecbce178aa9f21f13270c4ffaca0..e11898f903183f897a2b2a50a4447ea73ba7273f:/src/mac/carbon/stattext.cpp diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index 93998884fd..16e9aca2fb 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -78,6 +78,9 @@ wxSize wxStaticText::DoGetBestSize() const } if ( m_label.Length() == 0 ) bounds.h = 0 ; + + bounds.h += MacGetLeftBorderSize() + MacGetRightBorderSize() ; + bounds.v += MacGetTopBorderSize() + MacGetBottomBorderSize() ; return wxSize(bounds.h, bounds.v); } @@ -95,7 +98,7 @@ void wxStaticText::SetLabel(const wxString& st ) InvalidateBestSize(); SetSize( GetBestSize() ) ; } - + Refresh() ; Update() ; } @@ -106,10 +109,10 @@ bool wxStaticText::SetFont(const wxFont& font) if ( ret ) { if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) - { - InvalidateBestSize(); - SetSize( GetBestSize() ); - } + { + InvalidateBestSize(); + SetSize( GetBestSize() ); + } } return ret;