]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
save the current status text for each pane inside wxStatusBarPane: native controls...
[wxWidgets.git] / src / common / sizer.cpp
index 98990a2ee106c0e5e946cfc9f9bf0b80980d2b7b..173a0a48106109f8a2e42dfd14d2bb57f511ffed 100644 (file)
@@ -480,10 +480,21 @@ void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ )
             break;
 
         case Item_Window:
+        {
+            // Use wxSIZE_FORCE_EVENT here since a sizer item might
+            // have changed alignment or some other property which would
+            // not change the size of the window. In such a case, no
+            // wxSizeEvent would normally be generated and thus the
+            // control wouldn't get layed out correctly here.
+#if 1
+            m_window->SetSize(pos.x, pos.y, size.x, size.y,
+                              wxSIZE_ALLOW_MINUS_ONE|wxSIZE_FORCE_EVENT );
+#else
             m_window->SetSize(pos.x, pos.y, size.x, size.y,
-                              wxSIZE_ALLOW_MINUS_ONE);
+                              wxSIZE_ALLOW_MINUS_ONE );
+#endif
             break;
-
+        }
         case Item_Sizer:
             m_sizer->SetDimension(pos, size);
             break;
@@ -1987,7 +1998,7 @@ void wxBoxSizer::RecalcSizes()
         }
         // NB: wxCENTRE is used here only for backwards compatibility,
         //     wxALIGN_CENTRE should be used in new code
-        else if ( flag & (wxCENTER | wxALIGN_CENTRE) )
+        else if ( flag & (wxCENTER | (IsVertical() ? wxALIGN_CENTRE_HORIZONTAL : wxALIGN_CENTRE_VERTICAL)))
         {
             PosInMinorDir(posChild) += (totalMinorSize - minorSize) / 2;
         }
@@ -2237,7 +2248,7 @@ void wxStdDialogButtonSizer::Realize()
         }
 
         // Extra space around and at the right
-        Add(12, 24);
+        Add(12, 40);
 #elif defined(__WXGTK20__)
         Add(0, 0, 0, wxLEFT, 9);
         if (m_buttonHelp)