From f8b113dd180443ff5435253c2e87939f0fc1f7e7 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 7 May 2016 10:43:12 -0400 Subject: [PATCH] Fixed the controlgallery somehow. --- darwin/group.m | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/darwin/group.m b/darwin/group.m index f8149c48..663c58cd 100644 --- a/darwin/group.m +++ b/darwin/group.m @@ -72,14 +72,24 @@ uiDarwinControlDefaultSetSuperview(uiGroup, box) static BOOL uiGroupChildrenShouldAllowSpaceAtTrailingEdge(uiDarwinControl *c) { - // always allow growth - // TODO actually these should probably only allow growth if the parent does... + 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) { - // always allow growth + uiControl *parent; + + parent = uiControlParent(uiControl(c)); + if (parent != NULL) + return uiDarwinControlChildrenShouldAllowSpaceAtBottom(uiDarwinControl(parent)); + // always allow growth if not return YES; }