From f9e3b7a2d55e9c33a2dbc81dc2817d67f6df101d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 6 May 2016 20:55:33 -0400 Subject: [PATCH] Okay we've got a handle on how this is supposed to work now I think; I just need to figure out how to abstract out this should-expand behavior... --- darwin/box.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/darwin/box.m b/darwin/box.m index 21b6c162..eda2142c 100644 --- a/darwin/box.m +++ b/darwin/box.m @@ -259,12 +259,14 @@ static BOOL addRemoveNoStretchyView(uiBox *b, BOOL hasStretchy) uintmax_t i, n; n = [bv.b->children count]; + if (bv.b->vertical != self.b->vertical) + return YES; for (i = 0; i < n; i++) if (isStretchy(bv.b, i)) - return NO; - return YES; + return YES; + return NO; } - return NO; + return YES; } - (void)layout @@ -272,7 +274,7 @@ static BOOL addRemoveNoStretchyView(uiBox *b, BOOL hasStretchy) [super layout]; if (!self.willRelayout) return; self.willRelayout = NO; - if (!self.stretchy && [self inStretchyView]) { + if (!self.stretchy && ![self inStretchyView]) { NSView *prev; prev = [self.last firstItem];