diff --git a/redo/osxaltest/button.m b/redo/osxaltest/button.m index e676c602..a80ebe2a 100644 --- a/redo/osxaltest/button.m +++ b/redo/osxaltest/button.m @@ -53,11 +53,11 @@ horzpred = predicate; } [p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]]; - [p->horzAttachLeft addObject:@YES]; - [p->horzAttachRight addObject:@YES]; + [p->horzAttachLeft addObject:[NSNumtber numberWithBool:p->horzFirst]]; + [p->horzAttachRight addObject:[NSNumber numberWithBool:p->horzLast]]; [p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]]; - [p->vertAttachTop addObject:@YES]; - [p->vertAttachBottom addObject:@YES]; + [p->vertAttachTop addObject:[NSNumber numberWithBool:p->vertFirst]]; + [p->vertAttachBottom addObject:[NSNumber numberWithBool:p->vertLast]]; [p->views setObject:self->b forKey:key]; } diff --git a/redo/osxaltest/osxaltest.h b/redo/osxaltest/osxaltest.h index 76fa7361..e20abeb5 100644 --- a/redo/osxaltest/osxaltest.h +++ b/redo/osxaltest/osxaltest.h @@ -8,9 +8,13 @@ struct tAutoLayoutParams { NSMutableArray *horz; NSMutableArray *horzAttachLeft; NSMutableArray *horzAttachRight; + BOOL horzFirst; + BOOL horzLast; NSMutableArray *vert; NSMutableArray *vertAttachTop; NSMutableArray *vertAttachBottom; + BOOL vertFirst; + BOOL vertLast; NSMutableDictionary *views; uintmax_t n; BOOL stretchy; diff --git a/redo/osxaltest/spinbox.m b/redo/osxaltest/spinbox.m index 949ec974..120ec8fe 100644 --- a/redo/osxaltest/spinbox.m +++ b/redo/osxaltest/spinbox.m @@ -95,11 +95,11 @@ horzpred = predicate; } [p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]]; - [p->horzAttachLeft addObject:@YES]; - [p->horzAttachRight addObject:@YES]; + [p->horzAttachLeft addObject:[NSNumtber numberWithBool:p->horzFirst]]; + [p->horzAttachRight addObject:[NSNumber numberWithBool:p->horzLast]]; [p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]]; - [p->vertAttachTop addObject:@YES]; - [p->vertAttachBottom addObject:@YES]; + [p->vertAttachTop addObject:[NSNumber numberWithBool:p->vertFirst]]; + [p->vertAttachBottom addObject:[NSNumber numberWithBool:p->vertLast]]; [p->views setObject:self->c forKey:key]; } diff --git a/redo/osxaltest/window.m b/redo/osxaltest/window.m index 8816df85..66dcad5a 100644 --- a/redo/osxaltest/window.m +++ b/redo/osxaltest/window.m @@ -55,9 +55,13 @@ p.horz = [NSMutableArray new]; p.horzAttachLeft = [NSMutableArray new]; p.horzAttachRight = [NSMutableArray new]; + p.horzFirst = YES; // only control here + p.horzLast = YES; p.vert = [NSMutableArray new]; p.vertAttachTop = [NSMutableArray new]; p.vertAttachBottom = [NSMutableArray new]; + p.vertFirst = YES; + p.vertLast = YES; p.views = [NSMutableDictionary new]; p.n = 0; [self->c tFillAutoLayout:&p];