From 997e8e2979b126b15993a79a37c8ae0c8dff664e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 8 Mar 2009 15:59:23 +0000 Subject: [PATCH] take into account the width of the static box label in wxStaticBoxSizer minimal size computation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index ea3031200b..a4c17f8b8c 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -2178,6 +2178,13 @@ wxSize wxStaticBoxSizer::CalcMin() wxSize ret( wxBoxSizer::CalcMin() ); ret.x += 2*other_border; + + // ensure that we're wide enough to show the static box label (there is no + // need to check for the static box best size in vertical direction though) + const int boxWidth = m_staticBox->GetBestSize().x; + if ( ret.x < boxWidth ) + ret.x = boxWidth; + ret.y += other_border + top_border; return ret; -- 2.45.2