Set m_minWidth, m_minHeight so that GetBestSize() works properly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -401,9 +401,10 @@ bool wxToolBar::Realize()
|
|||||||
// if not set yet, only one row
|
// if not set yet, only one row
|
||||||
SetRows(1);
|
SetRows(1);
|
||||||
}
|
}
|
||||||
|
m_minWidth = maxWidth;
|
||||||
maxWidth = tw ;
|
maxWidth = tw ;
|
||||||
maxHeight += m_yMargin + kwxMacToolBarTopMargin;
|
maxHeight += m_yMargin + kwxMacToolBarTopMargin;
|
||||||
m_maxHeight = maxHeight ;
|
m_minHeight = m_maxHeight = maxHeight ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -412,9 +413,10 @@ bool wxToolBar::Realize()
|
|||||||
// if not set yet, have one column
|
// if not set yet, have one column
|
||||||
SetRows(GetToolsCount());
|
SetRows(GetToolsCount());
|
||||||
}
|
}
|
||||||
|
m_minHeight = maxHeight;
|
||||||
maxHeight = th ;
|
maxHeight = th ;
|
||||||
maxWidth += m_xMargin + kwxMacToolBarLeftMargin;
|
maxWidth += m_xMargin + kwxMacToolBarLeftMargin;
|
||||||
m_maxWidth = maxWidth ;
|
m_minWidth = m_maxWidth = maxWidth ;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetSize( maxWidth, maxHeight );
|
SetSize( maxWidth, maxHeight );
|
||||||
|
Reference in New Issue
Block a user