FINALLY fixed the ambiguity FOR REAL. The problem was improper NSBox handling. Now to restore the test program...
This commit is contained in:
parent
d4e7640f5b
commit
2aeccf4444
|
@ -43,7 +43,10 @@ static void groupRelayout(uiDarwinControl *c)
|
||||||
// first relayout the child
|
// first relayout the child
|
||||||
(*(cc->Relayout))(cc);
|
(*(cc->Relayout))(cc);
|
||||||
// now relayout ourselves
|
// now relayout ourselves
|
||||||
layoutSingleView([g->box contentView], childView, g->margined);
|
// see below on using the content view
|
||||||
|
layoutSingleView(g->box, childView, g->margined);
|
||||||
|
// we need to explicitly tell the NSBox to recompute its own size based on the new content layout
|
||||||
|
[g->box sizeToFit];
|
||||||
}
|
}
|
||||||
|
|
||||||
char *uiGroupTitle(uiGroup *g)
|
char *uiGroupTitle(uiGroup *g)
|
||||||
|
@ -71,7 +74,10 @@ void uiGroupSetChild(uiGroup *g, uiControl *child)
|
||||||
if (g->child != NULL) {
|
if (g->child != NULL) {
|
||||||
childView = (NSView *) uiControlHandle(g->child);
|
childView = (NSView *) uiControlHandle(g->child);
|
||||||
uiControlSetParent(g->child, uiControl(g));
|
uiControlSetParent(g->child, uiControl(g));
|
||||||
[[g->box contentView] addSubview:childView];
|
// we have to add controls to the box itself NOT the content view
|
||||||
|
// otherwise, things get really glitchy
|
||||||
|
// we also need to call -sizeToFit, but we'll do that in the relayout that's triggered below (see above)
|
||||||
|
[g->box addSubview:childView];
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(g));
|
uiDarwinControlTriggerRelayout(uiDarwinControl(g));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue