fixed wxScrolledWindow best size calculation to not use current size in computation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-12-21 22:48:44 +00:00
parent 108c23222a
commit 16fb9e58c1

View File

@@ -39,6 +39,7 @@
#include "wx/timer.h"
#endif
#include "wx/sizer.h"
#include "wx/settings.h"
#endif
#ifdef __WXMAC__
@@ -1064,14 +1065,12 @@ wxScrollHelper::ScrollGetWindowSizeForVirtualSize(const wxSize& size) const
GetScrollPixelsPerUnit(&ppuX, &ppuY);
wxSize minSize = m_win->GetMinSize();
if ( !minSize.IsFullySpecified() )
minSize = m_win->GetSize();
wxSize best(size);
if (ppuX > 0)
best.x = minSize.x;
best.x = minSize.x + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
if (ppuY > 0)
best.y = minSize.y;
best.y = minSize.y + wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y);
return best;
}