Position: uses the final sizes to position everything within layouts according to alignment settings.
()
| 1637 | // Position: uses the final sizes to position everything within layouts |
| 1638 | // according to alignment settings. |
| 1639 | func (fr *Frame) Position() { |
| 1640 | if !fr.HasChildren() || !fr.layout.shapeCheck(fr, "Position") { |
| 1641 | fr.WidgetBase.Position() // behave like a widget |
| 1642 | return |
| 1643 | } |
| 1644 | if fr.Parent == nil { |
| 1645 | fr.positionWithinAllocMainY(math32.Vector2{}, fr.Styles.Justify.Items, fr.Styles.Align.Items) |
| 1646 | } |
| 1647 | fr.ConfigScrolls() // and configure the scrolls |
| 1648 | if fr.Styles.Display == styles.Stacked { |
| 1649 | fr.positionStacked() |
| 1650 | } else { |
| 1651 | fr.positionCells() |
| 1652 | fr.positionChildren() |
| 1653 | } |
| 1654 | fr.positionParts() |
| 1655 | } |
| 1656 | |
| 1657 | func (fr *Frame) positionCells() { |
| 1658 | if fr.Styles.Display == styles.Flex && fr.Styles.Direction == styles.Column { |
nothing calls this directly
no test coverage detected