gradually increasing window size on repeated layout, by duplicate
application of the client to window size conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44555
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( m_windowSizer )
{
- best = GetWindowSizeForVirtualSize(m_windowSizer->GetMinSize());
+ // Adjust to window size, since the return value of GetWindowSizeForVirtualSize is
+ // expressed in window and not client size
+ wxSize minSize = m_windowSizer->GetMinSize();
+ wxSize size(GetSize());
+ wxSize clientSize(GetClientSize());
+
+ wxSize minWindowSize(minSize.x + size.x - clientSize.x,
+ minSize.y + size.y - clientSize.y);
+
+ best = GetWindowSizeForVirtualSize(minWindowSize);
+
+ return best;
}
#if wxUSE_CONSTRAINTS
else if ( m_constraints )