Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement row::Wrapping widget #2539

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Implement row::Wrapping widget #2539

merged 1 commit into from
Aug 6, 2024

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Aug 6, 2024

If you have a Row, simply call Row::wrap at the end to turn it into a Row that will wrap its contents.

row![a, b, c, d, e, f, g].spacing(10).wrap()

The original alignment of the Row is preserved per row wrapped.

The layout example now showcases its use:

row((1..10).map(|i| square(if i % 2 == 0 { 80 } else { 160 })))
    .spacing(20)
    .align_y(Center)
    .wrap()

image

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.
@hecrj hecrj added this to the 0.13 milestone Aug 6, 2024
@hecrj hecrj added feature New feature or request widget layout addition labels Aug 6, 2024
@hecrj hecrj merged commit d5ffe98 into master Aug 6, 2024
24 checks passed
@hecrj hecrj deleted the feature/row-wrapping branch August 6, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant