ui/cocoa/BoxContainer.m

changeset 799
f8ff8df41713
parent 785
b943e3d618f0
child 811
1391ba7e533f
equal deleted inserted replaced
798:504c45926386 799:f8ff8df41713
11 self.rowspacing = spacing; 11 self.rowspacing = spacing;
12 12
13 return self; 13 return self;
14 } 14 }
15 15
16 - (void) addView:(NSView*)view { 16 - (void) addView:(NSView*)view margin:(NSEdgeInsets)margin {
17 UiLayout layout = self.uilayout; 17 UiLayout layout = self.uilayout;
18 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { 18 if(_orientation == NSUserInterfaceLayoutOrientationVertical) {
19 layout.hexpand = TRUE; 19 layout.hexpand = TRUE;
20 layout.hfill = TRUE; 20 layout.hfill = TRUE;
21 } else { 21 } else {
22 layout.vexpand = TRUE; 22 layout.vexpand = TRUE;
23 layout.vfill = TRUE; 23 layout.vfill = TRUE;
24 self.newline = FALSE; 24 self.newline = FALSE;
25 } 25 }
26 self.uilayout = layout; 26 self.uilayout = layout;
27 [super addView:view]; 27 [super addView:view margin:margin];
28 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { 28 if(_orientation == NSUserInterfaceLayoutOrientationVertical) {
29 self.newline = TRUE; 29 self.newline = TRUE;
30 } 30 }
31 } 31 }
32 32

mercurial