Revert "Did the rest of it as stubs. Now to fix issues..."
This reverts commit 854e87b90a
.
This commit is contained in:
parent
b20b790254
commit
f413456b60
10
darwin/box.m
10
darwin/box.m
|
@ -95,9 +95,9 @@ struct uiBox {
|
|||
self->secondaryOrientation = NSLayoutConstraintOrientationVertical;
|
||||
}
|
||||
|
||||
// TODO default high?
|
||||
self->horzHuggingPri = NSLayoutPriorityRequired;
|
||||
self->vertHuggingPri = NSLayoutPriorityRequired;
|
||||
// TODO required?
|
||||
self->horzHuggingPri = NSLayoutPriorityDefaultHigh;
|
||||
self->vertHuggingPri = NSLayoutPriorityDefaultHigh;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ struct uiBox {
|
|||
[self removeConstraints:self->inBetweens];
|
||||
[self->inBetweens removeAllObjects];
|
||||
[self removeConstraint:self->last];
|
||||
[self removeConstraint:self->lastHugging];
|
||||
[self removeConstraint:self->last2];
|
||||
[self removeConstraints:self->otherConstraints];
|
||||
[self->otherConstraints removeAllObjects];
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ struct uiBox {
|
|||
// TODO will default high work?
|
||||
uiDarwinControlSetRealHuggingPriority(uiDarwinControl(bc.c), NSLayoutPriorityRequired, self->primaryOrientation);
|
||||
// make sure controls don't hug their secondary direction so they fill the width of the view
|
||||
uiDarwinControlSetRealHuggingPriority(uiDarwinControl(bc.c), NSLayoutPriorityDefaultLow, self->secondaryOrientation);
|
||||
uiDarwinControlSetRealHuggingPriority(uiDarwinControl(bc.cc), NSLayoutPriorityDefaultLow, self->secondaryOrientation);
|
||||
|
||||
[self->children addObject:bc];
|
||||
[bc release]; // we don't need the initial reference now
|
||||
|
|
|
@ -70,9 +70,27 @@ static void uiGroupSyncEnableState(uiDarwinControl *c, int enabled)
|
|||
|
||||
uiDarwinControlDefaultSetSuperview(uiGroup, box)
|
||||
|
||||
static void uiGroupSetRealHuggingPriority(uiDarwinControl *c, NSLayoutPriority priority, NSLayoutConstraintOrientation orientation)
|
||||
static BOOL uiGroupChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
|
||||
{
|
||||
// TODO
|
||||
uiControl *parent;
|
||||
|
||||
// TODO figure out why this works
|
||||
parent = uiControlParent(uiControl(c));
|
||||
if (parent != NULL)
|
||||
return uiDarwinControlChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl(parent));
|
||||
// always allow growth if not
|
||||
return YES;
|
||||
}
|
||||
|
||||
static BOOL uiGroupChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
|
||||
{
|
||||
uiControl *parent;
|
||||
|
||||
parent = uiControlParent(uiControl(c));
|
||||
if (parent != NULL)
|
||||
return uiDarwinControlChildrenShouldAllowSpaceAtBottom(uiDarwinControl(parent));
|
||||
// always allow growth if not
|
||||
return YES;
|
||||
}
|
||||
|
||||
static void groupRelayout(uiGroup *g)
|
||||
|
|
11
darwin/tab.m
11
darwin/tab.m
|
@ -56,9 +56,16 @@ uiDarwinControlDefaultSyncEnableState(uiTab, tabview)
|
|||
|
||||
uiDarwinControlDefaultSetSuperview(uiTab, tabview)
|
||||
|
||||
static void uiTabSetRealHuggingPriority(uiDarwinControl *c, NSLayoutPriority priority, NSLayoutConstraintOrientation orientation)
|
||||
static BOOL uiTabChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
|
||||
{
|
||||
// TODO
|
||||
// always allow growth
|
||||
return YES;
|
||||
}
|
||||
|
||||
static BOOL uiTabChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
|
||||
{
|
||||
// always allow growth
|
||||
return YES;
|
||||
}
|
||||
|
||||
static void tabRelayout(uiTab *t)
|
||||
|
|
|
@ -141,9 +141,16 @@ static void uiWindowSetSuperview(uiDarwinControl *c, NSView *superview)
|
|||
// TODO
|
||||
}
|
||||
|
||||
static void uiWindowSetRealHuggingPriority(uiDarwinControl *c, NSLayoutPriority priority, NSLayoutConstraintOrientation orientation)
|
||||
static BOOL uiWindowChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
|
||||
{
|
||||
// do nothing; uiWindow children never hug (to maintain parity with other OSs)
|
||||
// always allow growth
|
||||
return YES;
|
||||
}
|
||||
|
||||
static BOOL uiWindowChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
|
||||
{
|
||||
// always allow growth
|
||||
return YES;
|
||||
}
|
||||
|
||||
static void windowRelayout(uiWindow *w)
|
||||
|
|
Loading…
Reference in New Issue