diff --git a/darwin/box.m b/darwin/box.m index 5ef801a0..be4658a4 100644 --- a/darwin/box.m +++ b/darwin/box.m @@ -168,7 +168,7 @@ static void relayout(uiBox *b) // if there is a stretchy control, add the no-stretchy view addRemoveNoStretchyView(b, hasStretchy); - if (hasStretchy) { + if (!hasStretchy) { [b->view addConstraint:mkConstraint(b->noStretchyView, b->primaryStart, NSLayoutRelationEqual, prev, b->primaryEnd, diff --git a/darwin/spinbox.m b/darwin/spinbox.m index d2be6d89..1ddff150 100644 --- a/darwin/spinbox.m +++ b/darwin/spinbox.m @@ -89,7 +89,7 @@ struct uiSpinbox { self, NSLayoutAttributeBottom, 1, 0, @"uiSpinbox bottom edge stepper")]; - [self addConstraint:mkConstraint(self->stepper, NSLayoutAttributeTrailing, + [self addConstraint:mkConstraint(self->tf, NSLayoutAttributeTrailing, NSLayoutRelationEqual, self->stepper, NSLayoutAttributeLeading, 1, -3, // TODO