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
This commit is contained in:
David Elliott 2003-08-19 04:10:47 +00:00
parent c5bd91912f
commit 8ea5801e9e

View File

@ -502,7 +502,7 @@ void wxWindowCocoa::DoMoveWindow(int x, int y, int width, int height)
NSView *nsview = GetNSViewForSuperview(); NSView *nsview = GetNSViewForSuperview();
NSView *superview = [nsview superview]; NSView *superview = [nsview superview];
wxCHECK_RET(superview,"NSView does not have a 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); NSRect cocoaRect = NSMakeRect(x,parentRect.size.height-(y+height),width,height);
[nsview setFrame: cocoaRect]; [nsview setFrame: cocoaRect];
@ -515,7 +515,7 @@ void wxWindowCocoa::SetInitialFrameRect(const wxPoint& pos, const wxSize& size)
NSView *nsview = GetNSViewForSuperview(); NSView *nsview = GetNSViewForSuperview();
NSView *superview = [nsview superview]; NSView *superview = [nsview superview];
wxCHECK_RET(superview,"NSView does not have a superview"); wxCHECK_RET(superview,"NSView does not have a superview");
NSRect parentRect = [superview frame]; NSRect parentRect = [superview bounds];
NSRect frameRect = [nsview frame]; NSRect frameRect = [nsview frame];
if(size.x!=-1) if(size.x!=-1)
frameRect.size.width = size.x; frameRect.size.width = size.x;
@ -548,7 +548,7 @@ void wxWindow::DoGetPosition(int *x, int *y) const
NSView *nsview = GetNSViewForSuperview(); NSView *nsview = GetNSViewForSuperview();
NSView *superview = [nsview superview]; NSView *superview = [nsview superview];
wxCHECK_RET(superview,"NSView does not have a superview"); wxCHECK_RET(superview,"NSView does not have a superview");
NSRect parentRect = [superview frame]; NSRect parentRect = [superview bounds];
NSRect cocoaRect = [nsview frame]; NSRect cocoaRect = [nsview frame];
if(x) if(x)