Since wxPanel is now AutoLayout aware, removed indirect auto layouting
of child windows from wxNotebook and wxSplitter, as per Robert's request. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1720,8 +1720,10 @@ from within wxWindow::OnSize functions.}
|
||||
\wxheading{Remarks}
|
||||
|
||||
Note that this function is actually disabled for wxWindow. It has
|
||||
effect for wxDialog, wxFrame, wxPanel and wxScrolledWindow as well as indirectly for
|
||||
children of wxNotebook and wxSplitterWindow.
|
||||
effect for wxDialog, wxFrame, wxPanel and wxScrolledWindow. Windows
|
||||
of other types that need to invoke the Layout algorithm should provide
|
||||
an EVT_SIZE handler and call
|
||||
\helpref{wxWindow::Layout}{wxwindowlayout} from within it.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
|
@@ -619,8 +619,6 @@ void wxSplitterWindow::SizeWindows()
|
||||
{
|
||||
m_windowOne->SetSize(m_borderSize, m_borderSize, w - 2*m_borderSize, h - 2*m_borderSize);
|
||||
|
||||
if (m_windowOne->GetAutoLayout())
|
||||
m_windowOne->Layout();
|
||||
}
|
||||
else if ( m_windowOne && m_windowTwo )
|
||||
{
|
||||
@@ -639,10 +637,6 @@ void wxSplitterWindow::SizeWindows()
|
||||
m_windowOne->SetSize(x1, y1, w1, h1);
|
||||
m_windowTwo->SetSize(x2, y2, w2, h2);
|
||||
|
||||
if (m_windowOne->GetAutoLayout())
|
||||
m_windowOne->Layout();
|
||||
if (m_windowTwo->GetAutoLayout())
|
||||
m_windowTwo->Layout();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -651,10 +645,6 @@ void wxSplitterWindow::SizeWindows()
|
||||
m_windowTwo->SetSize(m_borderSize, m_sashPosition + m_sashSize,
|
||||
w - 2*m_borderSize, h - 2*m_borderSize - m_sashSize - (m_sashPosition - m_borderSize));
|
||||
|
||||
if (m_windowOne->GetAutoLayout())
|
||||
m_windowOne->Layout();
|
||||
if (m_windowTwo->GetAutoLayout())
|
||||
m_windowTwo->Layout();
|
||||
}
|
||||
}
|
||||
wxClientDC dc(this);
|
||||
|
@@ -124,8 +124,6 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
|
||||
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
|
||||
|
||||
if (win->GetAutoLayout())
|
||||
win->Layout();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -124,8 +124,6 @@ static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
|
||||
|
||||
win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
|
||||
|
||||
if (win->GetAutoLayout())
|
||||
win->Layout();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -414,8 +414,6 @@ bool wxNotebook::InsertPage(int nPage,
|
||||
GetSize((int *)&rc.right, (int *)&rc.bottom);
|
||||
TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
|
||||
pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
|
||||
if ( pPage->GetAutoLayout() )
|
||||
pPage->Layout();
|
||||
|
||||
|
||||
// some page should be selected: either this one or the first one if there is
|
||||
@@ -448,8 +446,6 @@ void wxNotebook::OnSize(wxSizeEvent& event)
|
||||
for ( size_t nPage = 0; nPage < nCount; nPage++ ) {
|
||||
wxNotebookPage *pPage = m_aPages[nPage];
|
||||
pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
|
||||
if ( pPage->GetAutoLayout() )
|
||||
pPage->Layout();
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
|
Reference in New Issue
Block a user