From: David Elliott Date: Tue, 19 Aug 2003 04:10:47 +0000 (+0000) Subject: Use bounds rect instead of frame rect when positioning subviews X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8ea5801e9e13ddf193c7110e65407a751f877312?ds=inline Use bounds rect instead of frame rect when positioning subviews git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 964d65e8da..7eae1635ab 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -502,7 +502,7 @@ void wxWindowCocoa::DoMoveWindow(int x, int y, int width, int height) NSView *nsview = GetNSViewForSuperview(); NSView *superview = [nsview superview]; wxCHECK_RET(superview,"NSView does not have a superview"); - NSRect parentRect = [superview frame]; + NSRect parentRect = [superview bounds]; NSRect cocoaRect = NSMakeRect(x,parentRect.size.height-(y+height),width,height); [nsview setFrame: cocoaRect]; @@ -515,7 +515,7 @@ void wxWindowCocoa::SetInitialFrameRect(const wxPoint& pos, const wxSize& size) NSView *nsview = GetNSViewForSuperview(); NSView *superview = [nsview superview]; wxCHECK_RET(superview,"NSView does not have a superview"); - NSRect parentRect = [superview frame]; + NSRect parentRect = [superview bounds]; NSRect frameRect = [nsview frame]; if(size.x!=-1) frameRect.size.width = size.x; @@ -548,7 +548,7 @@ void wxWindow::DoGetPosition(int *x, int *y) const NSView *nsview = GetNSViewForSuperview(); NSView *superview = [nsview superview]; wxCHECK_RET(superview,"NSView does not have a superview"); - NSRect parentRect = [superview frame]; + NSRect parentRect = [superview bounds]; NSRect cocoaRect = [nsview frame]; if(x)