Don't set the initial size as minimal size for top level windows.
Correct the change of r62814: only call SetMinSize() for non-top-level windows as the user should be able to resize the top-level ones to be smaller than their initial size. This also fixes the GTK+ warning resulting from calling wxTLW::SetMinSize() from the ctor, before the window is realized. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -241,8 +241,10 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
|
||||
|
||||
// assume the user doesn't want this window to shrink beneath its initial
|
||||
// size, this worked like this in wxWidgets 2.8 and before and generally
|
||||
// often makes sense
|
||||
SetMinSize(size);
|
||||
// often makes sense for child windows (for top level ones it definitely
|
||||
// does not as the user should be able to resize the window)
|
||||
if ( !wxTopLevelWindows.Find(this) ) // can't use IsTopLevel() from ctor
|
||||
SetMinSize(size);
|
||||
|
||||
SetName(name);
|
||||
SetParent(parent);
|
||||
|
Reference in New Issue
Block a user