From b34a1c036a18e1bf90cd81b264ee9dfe1d5382f3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Dec 2017 00:30:12 +0100 Subject: [PATCH] Account for label window in wxStaticBoxBase::GetBordersForSizer() Take the window used as label into account in the default implementation of this method. --- src/common/statboxcmn.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/statboxcmn.cpp b/src/common/statboxcmn.cpp index c8427783f3..4db934146a 100644 --- a/src/common/statboxcmn.cpp +++ b/src/common/statboxcmn.cpp @@ -42,7 +42,15 @@ void wxStaticBoxBase::GetBordersForSizer(int *borderTop, int *borderOther) const { const int BORDER = FromDIP(5); // FIXME: hardcoded value - *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); + if ( m_labelWin ) + { + *borderTop = m_labelWin->GetSize().y; + } + else + { + *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); + } + *borderOther = BORDER; }