Skip to content

Implement row::Wrapping widget#2539

Merged
hecrj merged 1 commit intomasterfrom
feature/row-wrapping
Aug 6, 2024
Merged

Implement row::Wrapping widget#2539
hecrj merged 1 commit intomasterfrom
feature/row-wrapping

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

Comments