From 2cbc4d93bdea293cad9a9518b4c7fce1882b2183 Mon Sep 17 00:00:00 2001 From: Blair Duncan Date: Fri, 7 Jun 2013 02:19:43 -0400 Subject: [PATCH 1/2] 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]; From 084bc8416057bb30b3e523db025657ee04a5fd55 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 27 Jul 2013 13:41:35 -0400 Subject: [PATCH 2/2] Fixed: removed redundant code. --- AppKit/Cib/_CPCibWindowTemplate.j | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/AppKit/Cib/_CPCibWindowTemplate.j b/AppKit/Cib/_CPCibWindowTemplate.j index 551521278..47043d05a 100644 --- a/AppKit/Cib/_CPCibWindowTemplate.j +++ b/AppKit/Cib/_CPCibWindowTemplate.j @@ -107,10 +107,7 @@ [_windowView setAutoresizesSubviews:NO]; [theWindow setContentView:_windowView]; - [_windowView setAutoresizesSubviews:YES]; - - [[theWindow contentView] setAutoresizesSubviews:contentViewAutoresizesSubviews]; - + [_windowView setAutoresizesSubviews:contentViewAutoresizesSubviews]; if ([_viewClass isKindOfClass:[CPToolbar class]]) [theWindow setToolbar:_viewClass];