]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
Smartphone adjustements to generic log dialog.
[wxWidgets.git] / src / gtk / scrolwin.cpp
index afd8aa4951273ea35f36d1d648620850e423add9..df019190897bbd93e368ae33b6b655c4c4bb517a 100644 (file)
@@ -852,19 +852,12 @@ bool wxScrolledWindow::Layout()
 // Default OnSize resets scrollbars, if any
 void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
 {
-    if( GetAutoLayout() || m_targetWindow->GetAutoLayout() )
+    if ( m_targetWindow->GetAutoLayout() )
     {
-        if( m_targetWindow != this )
-            m_targetWindow->FitInside();
-
-        FitInside();
-
-        // FIXME:  Something is really weird here...  This should be
-        // called by FitInside above (and apparently is), yet the
-        // scrollsub sample will get the scrollbar wrong if resized
-        // quickly.  This masks the bug, but is surely not the right
-        // answer at all.
-        AdjustScrollbars();
+        wxSize size = m_targetWindow->GetBestVirtualSize();
+        
+        // This will call ::Layout() and ::AdjustScrollbars()
+        SetVirtualSize( size );
     }
     else
     {