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...
This commit is contained in:
parent
e462c7a660
commit
f9e3b7a2d5
10
darwin/box.m
10
darwin/box.m
|
@ -259,12 +259,14 @@ static BOOL addRemoveNoStretchyView(uiBox *b, BOOL hasStretchy)
|
||||||
uintmax_t i, n;
|
uintmax_t i, n;
|
||||||
|
|
||||||
n = [bv.b->children count];
|
n = [bv.b->children count];
|
||||||
|
if (bv.b->vertical != self.b->vertical)
|
||||||
|
return YES;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
if (isStretchy(bv.b, i))
|
if (isStretchy(bv.b, i))
|
||||||
return NO;
|
return YES;
|
||||||
return YES;
|
return NO;
|
||||||
}
|
}
|
||||||
return NO;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)layout
|
- (void)layout
|
||||||
|
@ -272,7 +274,7 @@ static BOOL addRemoveNoStretchyView(uiBox *b, BOOL hasStretchy)
|
||||||
[super layout];
|
[super layout];
|
||||||
if (!self.willRelayout) return;
|
if (!self.willRelayout) return;
|
||||||
self.willRelayout = NO;
|
self.willRelayout = NO;
|
||||||
if (!self.stretchy && [self inStretchyView]) {
|
if (!self.stretchy && ![self inStretchyView]) {
|
||||||
NSView *prev;
|
NSView *prev;
|
||||||
|
|
||||||
prev = [self.last firstItem];
|
prev = [self.last firstItem];
|
||||||
|
|
Loading…
Reference in New Issue