From 1e2a653becca5ab3b7abb8900ea0e10ee3eecdde Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 Jun 2002 23:37:03 +0000 Subject: [PATCH] no changes (reformatted some code just to be able to read it) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 9d374520a4..65fdad6ae3 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -175,9 +175,10 @@ void wxWindowBase::InitBase() #endif // wxUSE_PALETTE m_virtualSize = wxDefaultSize; - m_minVirtualWidth = -1; - m_minVirtualHeight = -1; - m_maxVirtualWidth = -1; + + m_minVirtualWidth = + m_minVirtualHeight = + m_maxVirtualWidth = m_maxVirtualHeight = -1; // Whether we're using the current theme for this window (wxGTK only for now) @@ -580,13 +581,16 @@ void wxWindowBase::SetVirtualSizeHints( int minW, int minH, void wxWindowBase::DoSetVirtualSize( int x, int y ) { - if( m_minVirtualWidth != -1 && m_minVirtualWidth > x ) x = m_minVirtualWidth; - if( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x ) x = m_maxVirtualWidth; - if( m_minVirtualHeight != -1 && m_minVirtualHeight > y ) y = m_minVirtualHeight; - if( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y ) y = m_maxVirtualHeight; + if ( m_minVirtualWidth != -1 && m_minVirtualWidth > x ) + x = m_minVirtualWidth; + if ( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x ) + x = m_maxVirtualWidth; + if ( m_minVirtualHeight != -1 && m_minVirtualHeight > y ) + y = m_minVirtualHeight; + if ( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y ) + y = m_maxVirtualHeight; - m_virtualSize.SetWidth( x ); - m_virtualSize.SetHeight( y ); + m_virtualSize = wxSize(x, y); } wxSize wxWindowBase::DoGetVirtualSize() const -- 2.45.2