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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-14 00:25:20 +00:00
parent e8ddc5bda1
commit 6fa2dd0eb9
2 changed files with 11 additions and 1 deletions

View File

@@ -56,6 +56,13 @@ wxMSW:
- Return the restored window size from GetSize() when window is minimized.
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;
}