]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
A better compile fix for Wine (which lacks pbt.h).
[wxWidgets.git] / src / common / sizer.cpp
index 89778aa339e9dc3a441e4cee76bb61f183455874..9d6d50de0b35cfc962d559c30ffbdf2039dc65c0 100644 (file)
@@ -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;