Adjusted uiGroup, uiTab, and uiWindow likewise. More TODOs.

This commit is contained in:
Pietro Gagliardi 2016-05-07 01:34:33 -04:00
parent 305b4b98cb
commit b03aa35da8
3 changed files with 36 additions and 6 deletions

View File

@ -69,8 +69,19 @@ static void uiGroupSyncEnableState(uiDarwinControl *c, int enabled)
}
uiDarwinControlDefaultSetSuperview(uiGroup, box)
uiDarwinControlDefaultChildrenShouldAllowSpaceAtTrailingEdge(uiGroup, box)
uiDarwinControlDefaultChildrenShouldAllowSpaceAtBottom(uiGroup, box)
static BOOL uiGroupChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
{
// always allow growth
// TODO actually these should probably only allow growth if the parent does...
return YES;
}
static BOOL uiGroupChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
{
// always allow growth
return YES;
}
static void groupRelayout(uiGroup *g)
{

View File

@ -55,8 +55,18 @@ uiDarwinControlDefaultDisable(uiTab, tabview)
uiDarwinControlDefaultSyncEnableState(uiTab, tabview)
uiDarwinControlDefaultSetSuperview(uiTab, tabview)
uiDarwinControlDefaultChildrenShouldAllowSpaceAtTrailingEdge(uiTab, tabview)
uiDarwinControlDefaultChildrenShouldAllowSpaceAtBottom(uiTab, tabview)
static BOOL uiTabChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
{
// always allow growth
return YES;
}
static BOOL uiTabChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
{
// always allow growth
return YES;
}
static void tabRelayout(uiTab *t)
{

View File

@ -141,8 +141,17 @@ static void uiWindowSetSuperview(uiDarwinControl *c, NSView *superview)
// TODO
}
uiDarwinControlDefaultChildrenShouldAllowSpaceAtTrailingEdge(uiWindow, window)
uiDarwinControlDefaultChildrenShouldAllowSpaceAtBottom(uiWindow, window)
static BOOL uiWindowChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c)
{
// always allow growth
return YES;
}
static BOOL uiWindowChildrenShouldAllowSpaceAtBottom(uiDarwinControl *c)
{
// always allow growth
return YES;
}
static void windowRelayout(uiWindow *w)
{