diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index 02dc3ea81d..e4ea49abb1 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -150,6 +150,12 @@ protected: // send the iconize event, return TRUE if processed bool SendIconizeEvent(bool iconized = TRUE); + // Get the default size for the new window if no explicit size given. If + // there are better default sizes then these can be changed, just as long + // as they are not too small for TLWs. + static int WidthDefault(int w) { return w == -1 ? 400 : w; } + static int HeightDefault(int h) { return h == -1 ? 250 : h; } + // the frame icon wxIconBundle m_icons; diff --git a/include/wx/window.h b/include/wx/window.h index 1d3ab69344..80925c1468 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1060,8 +1060,8 @@ protected: // Get the default size for the new window if no explicit size given. If // there are better default sizes then these can be changed, just as long // as they are not too small for TLWs. - static int WidthDefault(int w) { return w == -1 ? 400 : w; } - static int HeightDefault(int h) { return h == -1 ? 250 : h; } + static int WidthDefault(int w) { return w == -1 ? 20 : w; } + static int HeightDefault(int h) { return h == -1 ? 20 : h; } // set the best size for the control if the default size was given: // replaces the fields of size == -1 with the best values for them and diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 4153c61a48..b4a0ed8489 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -328,7 +328,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, // least for MSW compatibility) wxSize size = sizeOrig; size.x = WidthDefault(size.x); - size.y = WidthDefault(size.y); + size.y = HeightDefault(size.y); wxTopLevelWindows.Append( this ); diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 4153c61a48..b4a0ed8489 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -328,7 +328,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, // least for MSW compatibility) wxSize size = sizeOrig; size.x = WidthDefault(size.x); - size.y = WidthDefault(size.y); + size.y = HeightDefault(size.y); wxTopLevelWindows.Append( this );