()
| 347 | } |
| 348 | |
| 349 | func (li *gridLayoutItem) LayoutFlags() LayoutFlags { |
| 350 | var flags LayoutFlags |
| 351 | |
| 352 | if len(li.children) == 0 { |
| 353 | return ShrinkableHorz | ShrinkableVert | GrowableHorz | GrowableVert |
| 354 | } else { |
| 355 | for _, item := range li.children { |
| 356 | if s, ok := item.(*spacerLayoutItem); ok && s.greedyLocallyOnly || !shouldLayoutItem(item) { |
| 357 | continue |
| 358 | } |
| 359 | |
| 360 | wf := item.LayoutFlags() |
| 361 | |
| 362 | if wf&GreedyHorz != 0 && item.Geometry().MaxSize.Width > 0 { |
| 363 | wf &^= GreedyHorz |
| 364 | } |
| 365 | if wf&GreedyVert != 0 && item.Geometry().MaxSize.Height > 0 { |
| 366 | wf &^= GreedyVert |
| 367 | } |
| 368 | |
| 369 | flags |= wf |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | return flags |
| 374 | } |
| 375 | |
| 376 | func (li *gridLayoutItem) IdealSize() Size { |
| 377 | return li.MinSize() |
nothing calls this directly
no test coverage detected