I keep running into situations where the old small default window size
was expected, and odd initial layouts resulted, so let's leave only TLWs at the new 400x250 default size, and give all other windows the old 20x20 default. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -150,6 +150,12 @@ protected:
|
|||||||
// send the iconize event, return TRUE if processed
|
// send the iconize event, return TRUE if processed
|
||||||
bool SendIconizeEvent(bool iconized = TRUE);
|
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
|
// the frame icon
|
||||||
wxIconBundle m_icons;
|
wxIconBundle m_icons;
|
||||||
|
|
||||||
|
@@ -1060,8 +1060,8 @@ protected:
|
|||||||
// Get the default size for the new window if no explicit size given. If
|
// 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
|
// there are better default sizes then these can be changed, just as long
|
||||||
// as they are not too small for TLWs.
|
// as they are not too small for TLWs.
|
||||||
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
|
||||||
|
@@ -328,7 +328,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
|
|||||||
// least for MSW compatibility)
|
// least for MSW compatibility)
|
||||||
wxSize size = sizeOrig;
|
wxSize size = sizeOrig;
|
||||||
size.x = WidthDefault(size.x);
|
size.x = WidthDefault(size.x);
|
||||||
size.y = WidthDefault(size.y);
|
size.y = HeightDefault(size.y);
|
||||||
|
|
||||||
wxTopLevelWindows.Append( this );
|
wxTopLevelWindows.Append( this );
|
||||||
|
|
||||||
|
@@ -328,7 +328,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
|
|||||||
// least for MSW compatibility)
|
// least for MSW compatibility)
|
||||||
wxSize size = sizeOrig;
|
wxSize size = sizeOrig;
|
||||||
size.x = WidthDefault(size.x);
|
size.x = WidthDefault(size.x);
|
||||||
size.y = WidthDefault(size.y);
|
size.y = HeightDefault(size.y);
|
||||||
|
|
||||||
wxTopLevelWindows.Append( this );
|
wxTopLevelWindows.Append( this );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user