From: Robin Dunn Date: Fri, 5 Mar 2004 21:04:10 +0000 (+0000) Subject: Changed WidthDefault() and HeightDefault() to use 400,250. If there X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a7c26d107d0c6f191e55d30613f4816e9c2f9386 Changed WidthDefault() and HeightDefault() to use 400,250. If there is a better set of default values feel free to change it, just don't make them too small for TLWs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/window.h b/include/wx/window.h index 0f1d01072d..2f08ddd460 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1040,9 +1040,8 @@ protected: virtual wxBorder GetDefaultBorder() const; // get the default size for the new window if no explicit size given - // FIXME why 20 and not 30, 10 or ...? - static int WidthDefault(int w) { return w == -1 ? 20 : w; } - static int HeightDefault(int h) { return h == -1 ? 20 : h; } + static int WidthDefault(int w) { return w == -1 ? 400 : w; } + static int HeightDefault(int h) { return h == -1 ? 250 : 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/window.cpp b/src/gtk/window.cpp index ab35ae0f20..1fe395f33c 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2790,10 +2790,8 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w { wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") ); - // This turns -1 into 30 so that a minimal window is - // visible even although -1,-1 has been given as the - // size of the window. the same trick is used in other - // ports and should make debugging easier. + // Use either the given size, or the default if -1 is given. + // See wxWindowBase for these functions. m_width = WidthDefault(size.x) ; m_height = HeightDefault(size.y); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index ab35ae0f20..1fe395f33c 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2790,10 +2790,8 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w { wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") ); - // This turns -1 into 30 so that a minimal window is - // visible even although -1,-1 has been given as the - // size of the window. the same trick is used in other - // ports and should make debugging easier. + // Use either the given size, or the default if -1 is given. + // See wxWindowBase for these functions. m_width = WidthDefault(size.x) ; m_height = HeightDefault(size.y);