From: Robin Dunn Date: Fri, 5 Mar 2004 23:36:20 +0000 (+0000) Subject: Use WidthDefault and HeightDefault X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/979fdc00c68c6404e7d5bf2939f7ef5725a66ce1 Use WidthDefault and HeightDefault git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 67a8669f69..a76f43123d 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -657,12 +657,8 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, if ( m_x < 20 ) m_x = 20 ; - m_width = size.x; - if (m_width == -1) - m_width = 20; - m_height = size.y; - if (m_height == -1) - m_height = 20; + m_width = WidthDefault(size.x); + m_height = HeightDefault(size.y); ::SetRect(&theBoundsRect, m_x, m_y , m_x + m_width, m_y + m_height); diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 67a8669f69..a76f43123d 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -657,12 +657,8 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, if ( m_x < 20 ) m_x = 20 ; - m_width = size.x; - if (m_width == -1) - m_width = 20; - m_height = size.y; - if (m_height == -1) - m_height = 20; + m_width = WidthDefault(size.x); + m_height = HeightDefault(size.y); ::SetRect(&theBoundsRect, m_x, m_y , m_x + m_width, m_y + m_height);