X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/43524b1583cbe798351fef03242f0990e1cfddc2..4813bb8d72d4e6821e031f2b19baaa338b714d39:/src/mac/carbon/statbox.cpp diff --git a/src/mac/carbon/statbox.cpp b/src/mac/carbon/statbox.cpp index cb3b47de90..398fc5fcb2 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 ); @@ -58,17 +58,17 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const // Later on, the staticbox's font height is added to this. extraTop = 0; - if ( UMAGetSystemVersion() >= 0x1030 ) // Panther - { - // As indicated by the HIG, Panther needs an extra border of 11 - // pixels (otherwise overlapping occurs at the top). The "other" - // border has to be 11. - extraTop = 11; - other = 11; - } + // As indicated by the HIG, Panther needs an extra border of 11 + // pixels (otherwise overlapping occurs at the top). The "other" + // border has to be 11. + extraTop = 11; + other = 11; } - *borderTop = extraTop + GetCharHeight(); + *borderTop = extraTop; + if ( !m_label.empty() ) + *borderTop += GetCharHeight(); + *borderOther = other; }