Provided GetBestVirtualSize and DoGetBestSize implementations for

generic and GTK+ wxScrolledWindow.

wxWindowBase::DoGetBestSize was returning a virtual size if there were child
controls, which was then used to set the scrolled window actual size.
Similarly, wxWindowBase::GetBestVirtualSize was returning
the actual window size; now we return the virtual size
for dimensions that have scrolling (e.g. vertical scrolling
direction), or the minimum/actual size for those that don't
(e.g. the maximum control width if there is no horizontal
scrolling).

This allows the scrolled window to be properly sized, whereas
before it would start off at the virtual size (giving
enormous layouts).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-03-17 21:21:45 +00:00
parent 50c06297bd
commit 844adaa47a
8 changed files with 190 additions and 2 deletions

View File

@@ -122,6 +122,7 @@ void wxSplitterWindow::Init()
m_firstY = 0;
m_sashPosition = m_requestedSashPosition = 0;
m_sashGravity = 0.0;
m_sashSize = -1; // -1 means use the native sash size
m_lastSize = wxSize(0,0);
m_checkRequestedSashPosition = false;
m_minimumPaneSize = 0;
@@ -471,7 +472,7 @@ bool wxSplitterWindow::SashHitTest(int x, int y, int tolerance)
int wxSplitterWindow::GetSashSize() const
{
return wxRendererNative::Get().GetSplitterParams(this).widthSash;
return m_sashSize > -1 ? m_sashSize : wxRendererNative::Get().GetSplitterParams(this).widthSash;
}
int wxSplitterWindow::GetBorderSize() const