pub enum Flex {
Start,
End,
Center,
SpaceBetween,
SpaceAround,
}Expand description
How leftover space is placed along the split axis, once Constraints
are resolved.
Only matters when the resolved pane sizes sum to less than area’s
length; passed to split_v_flex/split_h_flex.
split_v/split_h always behave like Start: any
leftover space trails after the last pane, unclaimed. This matches their
existing documented behavior, so adding Flex does not change them.
Variants§
Start
Panes are packed at the start of the area; leftover space trails
after the last pane. The default, and what split_v/split_h use.
End
Panes are packed at the end of the area; leftover space leads before the first pane.
Center
Leftover space is split evenly before and after the panes.
SpaceBetween
Leftover space is distributed as gaps between panes (none before the first or after the last). No-op with fewer than two panes.
SpaceAround
Leftover space is distributed as equal-width gaps around every pane, including before the first and after the last.