]> git.saurik.com Git - wxWidgets.git/commitdiff
mixed height and width
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 30 Mar 2004 12:55:21 +0000 (12:55 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 30 Mar 2004 12:55:21 +0000 (12:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp

index 795cadc188ced98c4c7cbd29dedce7c1adabb00a..63b69a544e4741bceb11bc8fbfc7656d6d8a9edf 100644 (file)
@@ -589,11 +589,11 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand
                 }
                 if ( toplevelWindow->GetMaxWidth() != -1 && adjustR.GetWidth() > toplevelWindow->GetMaxWidth() )
                     adjustR.SetWidth( toplevelWindow->GetMaxWidth() ) ;
-                if ( toplevelWindow->GetMaxHeight() != -1 && adjustR.GetWidth() > toplevelWindow->GetMaxHeight() )
+                if ( toplevelWindow->GetMaxHeight() != -1 && adjustR.GetHeight() > toplevelWindow->GetMaxHeight() )
                     adjustR.SetHeight( toplevelWindow->GetMaxHeight() ) ;
                 if ( toplevelWindow->GetMinWidth() != -1 && adjustR.GetWidth() < toplevelWindow->GetMinWidth() )
                     adjustR.SetWidth( toplevelWindow->GetMinWidth() ) ;
-                if ( toplevelWindow->GetMinHeight() != -1 && adjustR.GetWidth() < toplevelWindow->GetMinHeight() )
+                if ( toplevelWindow->GetMinHeight() != -1 && adjustR.GetHeight() < toplevelWindow->GetMinHeight() )
                     adjustR.SetHeight( toplevelWindow->GetMinHeight() ) ;
                 Rect adjustedRect = { adjustR.y , adjustR.x , adjustR.y + adjustR.height , adjustR.x + adjustR.width } ;
                 if ( !EqualRect( &newRect , &adjustedRect ) )