From f25f6620e667d3e4436eeea25444c06c59e8ceb2 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Fri, 1 May 2009 15:28:58 +0000 Subject: [PATCH] fix for placement of wxStaticBox childrens (which doesn't affect the placement of the siblings) when using wxStaticBoxSizer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 98e184efdb..47d3d48081 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -2165,6 +2165,17 @@ void wxStaticBoxSizer::RecalcSizes() m_size.x -= 2*other_border; m_size.y -= top_border + other_border; +#ifdef __WXGTK20__ + if (m_staticBox->GetChildren().GetCount() > 0) + { + // if the wxStaticBox has created a wxPizza to contain its children + // (see wxStaticBox::AddChild) then we need to place the items it contains + // in the wxBoxSizer::RecalcSizes() call below using coordinates relative + // to the top-left corner of the staticbox: + m_position.x = m_position.y = 0; + } +#endif + wxBoxSizer::RecalcSizes(); m_position = old_pos; -- 2.45.2