X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44038f9a6ca4860442544edb02b72102ae22b24e..39b61aa3eb950489f880fbe2024d3b5bc82a11f5:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 167a6d83e7..41c8a455bd 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -497,7 +497,18 @@ wxSize wxWindowBase::DoGetBestSize() const 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 ) @@ -2286,7 +2297,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) msg.Printf(_T("wxWidgets Library (%s port)\n") _T("Version %d.%d.%d%s%s, compiled at %s %s\n") _T("Runtime version of toolkit used is %d.%d.%s\n") - _T("Copyright (c) 1995-2006 wxWidgets team"), + _T("Copyright (c) 1995-2007 wxWidgets team"), wxPlatformInfo::Get().GetPortIdName().c_str(), wxMAJOR_VERSION, wxMINOR_VERSION,