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:
Héctor Ramón Jiménez 2024-08-06 03:19:27 +02:00
parent ff0da4dc81
commit 6fbbc30f5c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 211 additions and 9 deletions

View file

@ -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)