X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43524b1583cbe798351fef03242f0990e1cfddc2..797e38dde12c5dc2d99070eef25d9b8c2549d621:/src/mac/carbon/statbox.cpp diff --git a/src/mac/carbon/statbox.cpp b/src/mac/carbon/statbox.cpp index cb3b47de90..9080cab4f1 100644 --- a/src/mac/carbon/statbox.cpp +++ b/src/mac/carbon/statbox.cpp @@ -32,7 +32,7 @@ bool wxStaticBox::Create( wxWindow *parent, if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) ) return false; - m_label = label; + m_labelOrig = m_label = label; Rect bounds = wxMacGetBoundsForControl( this, pos, size ); @@ -68,7 +68,10 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const } } - *borderTop = extraTop + GetCharHeight(); + *borderTop = extraTop; + if ( !m_label.empty() ) + *borderTop += GetCharHeight(); + *borderOther = other; }