Implement row::Wrapping widget
If you have a `Row`, simply call `Row::wrap` at the end to turn it into a `Row` that will wrap its contents. The original alignment of the `Row` is preserved per row wrapped.
This commit is contained in:
parent
ff0da4dc81
commit
6fbbc30f5c
3 changed files with 211 additions and 9 deletions
|
|
@ -258,9 +258,10 @@ fn application<'a>() -> Element<'a, Message> {
|
|||
scrollable(
|
||||
column![
|
||||
"Content!",
|
||||
square(400),
|
||||
square(200),
|
||||
square(400),
|
||||
row((1..10).map(|i| square(if i % 2 == 0 { 80 } else { 160 })))
|
||||
.spacing(20)
|
||||
.align_y(Center)
|
||||
.wrap(),
|
||||
"The end"
|
||||
]
|
||||
.spacing(40)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue