From b03aa35da824b8393be83964d6fd18aa975d6612 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 7 May 2016 01:34:33 -0400 Subject: [PATCH] Adjusted uiGroup, uiTab, and uiWindow likewise. More TODOs. --- darwin/group.m | 15 +++++++++++++-- darwin/tab.m | 14 ++++++++++++-- darwin/window.m | 13 +++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/darwin/group.m b/darwin/group.m index c00b4d29..f8149c48 100644 --- a/darwin/group.m +++ b/darwin/group.m @@ -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) { diff --git a/darwin/tab.m b/darwin/tab.m index b5ce0283..3138b890 100644 --- a/darwin/tab.m +++ b/darwin/tab.m @@ -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) { diff --git a/darwin/window.m b/darwin/window.m index 3f46f5f4..4b2248f4 100644 --- a/darwin/window.m +++ b/darwin/window.m @@ -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) {