fix handling of partially-specified min size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
20bfc1c29f
commit
9240613a8d
@ -683,11 +683,15 @@ wxSize wxWindowBase::DoGetBestSize() const
|
|||||||
// then, when the containing window is shrunk back (because our initial
|
// then, when the containing window is shrunk back (because our initial
|
||||||
// best size had been used for computing the parent min size), we can't
|
// best size had been used for computing the parent min size), we can't
|
||||||
// be shrunk back any more because our best size is now bigger
|
// be shrunk back any more because our best size is now bigger
|
||||||
if ( !GetMinSize().IsFullySpecified() )
|
wxSize size = GetMinSize();
|
||||||
wxConstCast(this, wxWindowBase)->SetMinSize(GetSize());
|
if ( !size.IsFullySpecified() )
|
||||||
|
{
|
||||||
|
size.SetDefaults(GetSize());
|
||||||
|
wxConstCast(this, wxWindowBase)->SetMinSize(size);
|
||||||
|
}
|
||||||
|
|
||||||
// return as-is, unadjusted by the client size difference.
|
// return as-is, unadjusted by the client size difference.
|
||||||
return GetMinSize();
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any difference between size and client size
|
// Add any difference between size and client size
|
||||||
|
Loading…
Reference in New Issue
Block a user