]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
[wxWidgets.git] / src / gtk / toplevel.cpp
index 414ecd652f273618916a0e3de46174197f14cb18..9e2a4176f94abb4481ce305c98b401e63459592a 100644 (file)
@@ -545,10 +545,12 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
                                   wxWindowID id,
                                   const wxString& title,
                                   const wxPoint& pos,
-                                  const wxSize& size,
+                                  const wxSize& sizeOrig,
                                   long style,
                                   const wxString &name )
 {
+    const wxSize size(WidthDefault(sizeOrig.x), HeightDefault(sizeOrig.y));
+
     wxTopLevelWindows.Append( this );
 
     if (!PreCreation( parent, pos, size ) ||
@@ -747,9 +749,6 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
         gtk_window_set_policy(GTK_WINDOW(m_widget), 1, 1, 1);
 #endif
 
-    // GTK sometimes chooses very small size if max size hint is not explicitly set
-    DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, m_incWidth, m_incHeight);
-
     m_decorSize = GetCachedDecorSize();
     int w, h;
     GTKDoGetSize(&w, &h);