A set of actions that sits in a row when there is room and in a column when there is not, such as the foot of a dialog. The group owns the order, spacing and alignment of the buttons it is given.
A set of actions that sits in a row when there is room and in a column when
there is not, such as the foot of a dialog. The group owns the order, spacing
and alignment of the buttons it is given.
Import
use limn::{Button, ButtonGroup, ButtonVariant, Component};
Usage
Pass rendered buttons in reading order, the primary action last. They sit in
a row, 6 px apart. Each button still reports its own UiAction::Clicked.
stacked(true) lays the actions in a column, each as wide as the group. The
host decides when: the group does not measure itself. reverse_when_stacked
reverses the actions in the column so the primary one comes first; in a row
it does nothing.
Aligned to the end
ButtonGroup::new(buttons).align_end().render()
align_end pushes the actions to the far edge of the row.