replace 5 copies of size constraining code with one function

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-04-26 05:22:09 +00:00
parent aa34396cb2
commit 82008f15b7
5 changed files with 24 additions and 63 deletions

View File

@@ -334,15 +334,7 @@ void wxFrame::GtkOnSize()
skip the part which handles m_frameMenuBar, m_frameToolBar and (most
importantly) m_mainWidget */
int minWidth = GetMinWidth(),
minHeight = GetMinHeight(),
maxWidth = GetMaxWidth(),
maxHeight = GetMaxHeight();
if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
ConstrainSize();
if (m_mainWidget)
{