| 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 margin:(NSEdgeInsets)margin { |
16 - (void) addView:(NSView*)view layout:(UiLayout*)layout { |
| 17 UiLayout layout = self.uilayout; |
|
| 18 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
17 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
| 19 layout.hexpand = TRUE; |
18 layout->hexpand = TRUE; |
| 20 layout.hfill = TRUE; |
19 layout->hfill = TRUE; |
| 21 } else { |
20 } else { |
| 22 layout.vexpand = TRUE; |
21 layout->vexpand = TRUE; |
| 23 layout.vfill = TRUE; |
22 layout->vfill = TRUE; |
| 24 } |
23 } |
| 25 self.uilayout = layout; |
24 [super addView:view layout:layout]; |
| 26 [super addView:view margin:margin]; |
|
| 27 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
25 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
| 28 self.container->newline = TRUE; |
26 self.container->newline = TRUE; |
| 29 } |
27 } |
| 30 } |
28 } |
| 31 |
29 |