X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8cfff879ef8f5fdf7323010c244cfb8cfcedc84..dcfd4ac4125092a50a81d1b8059ed7dcd09ca56e:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 89778aa339..9d6d50de0b 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -25,7 +25,9 @@ #include "wx/math.h" #include "wx/utils.h" #include "wx/settings.h" + #include "wx/button.h" #include "wx/statbox.h" + #include "wx/toplevel.h" #endif // WX_PRECOMP #include "wx/listimpl.cpp" @@ -1694,6 +1696,16 @@ void wxBoxSizer::RecalcSizes() // wxALIGN_CENTER should be used in new code child_pos.y += (m_size.y - size.y) / 2; + if ( m_containingWindow ) + { + child_pos.x = m_containingWindow->AdjustForLayoutDirection + ( + child_pos.x, + width, + m_size.x + ); + } + item->SetDimension( child_pos, child_size ); pt.x += width;