X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca8d899fcb677bad4ed7df5c65887b725a092482..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 6c536703f1..ed390865d6 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1695,6 +1695,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;