don't add extra GetCharHeight() pixels to the top border if our label is empty (patch 1581459) [backport from HEAD]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-14 00:29:43 +00:00
parent 6ecfa38fff
commit 3a5c9d1005
2 changed files with 11 additions and 1 deletions

View File

@@ -88,6 +88,13 @@ Major new features in 2.8 release
wxSearchCtrl, wxAboutBox, wxTreebook, tar streams.
2.8.3
-----
wxMac
- Corrected top border size for wxStaticBox with empty label (nusi)
2.8.2
-----

View File

@@ -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;
}