From 2ce39888cda849d777a518e2f1786367ebc3fd42 Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 23 Oct 1999 22:24:43 +0000 Subject: [PATCH] Tiny changing for better sizing of content view git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5065 72102866-910b-0410-8b05-ffd578937521 --- Source/NSWindow.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 567c6f746..f01b1cc6c 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -85,14 +85,18 @@ BOOL GSViewAcceptsDrag(NSView *v, id dragInfo); } /* - * Special setFrame: implementation - don't use the autosize mechanism - * Just resize the windows content-view to this size. + * Special setFrame: implementation - a minimal autoresize mechanism */ - (void) setFrame: (NSRect)frameRect { + NSSize oldSize = frame.size; + NSView *cv = [window contentView]; + autoresize_subviews = NO; [super setFrame: frameRect]; - [[window contentView] setFrame: frameRect]; + // Safety Check. + [cv setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)]; + [cv resizeWithOldSuperviewSize: oldSize]; } - (Class) classForCoder: (NSCoder*)aCoder