From 2cbc4d93bdea293cad9a9518b4c7fce1882b2183 Mon Sep 17 00:00:00 2001 From: Blair Duncan Date: Fri, 7 Jun 2013 02:19:43 -0400 Subject: [PATCH] Fixed: CPWindows contentView Autoresizes Subviews set in Cib is now honoured Currently when a window is decoded from a cib, the contentView is set to always auto resize its subviews regardless of the setting in IB. --- AppKit/Cib/_CPCibWindowTemplate.j | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AppKit/Cib/_CPCibWindowTemplate.j b/AppKit/Cib/_CPCibWindowTemplate.j index 869469626..551521278 100644 --- a/AppKit/Cib/_CPCibWindowTemplate.j +++ b/AppKit/Cib/_CPCibWindowTemplate.j @@ -103,13 +103,15 @@ //[result setHidesOnDeactivate:(_wtFlags&0x80000000)?YES:NO]; [theWindow setTitle:_windowTitle]; - // FIXME: we can't autoresize yet... + var contentViewAutoresizesSubviews = [_windowView autoresizesSubviews]; + [_windowView setAutoresizesSubviews:NO]; - [theWindow setContentView:_windowView]; - [_windowView setAutoresizesSubviews:YES]; + [[theWindow contentView] setAutoresizesSubviews:contentViewAutoresizesSubviews]; + + if ([_viewClass isKindOfClass:[CPToolbar class]]) [theWindow setToolbar:_viewClass];