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
This commit is contained in:
Robin Dunn
2004-03-05 21:04:10 +00:00
parent fffd96b769
commit a7c26d107d
3 changed files with 6 additions and 11 deletions

View File

@@ -1040,9 +1040,8 @@ protected:
virtual wxBorder GetDefaultBorder() const; virtual wxBorder GetDefaultBorder() const;
// get the default size for the new window if no explicit size given // 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 ? 400 : w; }
static int WidthDefault(int w) { return w == -1 ? 20 : w; } static int HeightDefault(int h) { return h == -1 ? 250 : h; }
static int HeightDefault(int h) { return h == -1 ? 20 : h; }
// set the best size for the control if the default size was given: // 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 // replaces the fields of size == -1 with the best values for them and

View File

@@ -2790,10 +2790,8 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w
{ {
wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") ); wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") );
// This turns -1 into 30 so that a minimal window is // Use either the given size, or the default if -1 is given.
// visible even although -1,-1 has been given as the // See wxWindowBase for these functions.
// size of the window. the same trick is used in other
// ports and should make debugging easier.
m_width = WidthDefault(size.x) ; m_width = WidthDefault(size.x) ;
m_height = HeightDefault(size.y); m_height = HeightDefault(size.y);

View File

@@ -2790,10 +2790,8 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w
{ {
wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") ); wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") );
// This turns -1 into 30 so that a minimal window is // Use either the given size, or the default if -1 is given.
// visible even although -1,-1 has been given as the // See wxWindowBase for these functions.
// size of the window. the same trick is used in other
// ports and should make debugging easier.
m_width = WidthDefault(size.x) ; m_width = WidthDefault(size.x) ;
m_height = HeightDefault(size.y); m_height = HeightDefault(size.y);