]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_sizer.cpp
Restore MSW's colour picker
[wxWidgets.git] / src / xrc / xh_sizer.cpp
index 8e5e9793c451efbaeb987bb48b68f04da29d35c8..4b5f0b03aa1af7ab80faac575e33af12472ca8f8 100644 (file)
@@ -27,6 +27,7 @@
     #include "wx/frame.h"
     #include "wx/dialog.h"
     #include "wx/button.h"
+    #include "wx/scrolwin.h"
 #endif
 
 #include "wx/gbsizer.h"
@@ -236,7 +237,16 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
         wxXmlNode *nd = m_node;
         m_node = parentNode;
         if (GetSize() == wxDefaultSize)
-            sizer->Fit(m_parentAsWindow);
+        {
+            if ( wxDynamicCast(m_parentAsWindow, wxScrolledWindow) != NULL )
+            {
+                sizer->FitInside(m_parentAsWindow);
+            }
+            else
+            {
+                sizer->Fit(m_parentAsWindow);
+            }
+        }
         m_node = nd;
 
         if (m_parentAsWindow->IsTopLevel())