diff options
author | 2024-01-12 14:41:40 +0100 | |
---|---|---|
committer | 2024-01-12 14:41:40 +0100 | |
commit | 50c310fd9f692eafb2350827636ffbd6d7b6c9b9 (patch) | |
tree | 0f1ab4182a0cce7469e01881c095e0c3988b3f9a /examples/lazy/src | |
parent | 63e9adac56e9a4f21ec82137329d7c455fbf630b (diff) | |
parent | 11474bdc3e1a43e6c167d7b98f22d87933dbd2b6 (diff) | |
download | iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.tar.gz iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.tar.bz2 iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.zip |
Merge pull request #2192 from iced-rs/fix/layout-inconsistencies
Layout consistency
Diffstat (limited to 'examples/lazy/src')
-rw-r--r-- | examples/lazy/src/main.rs | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/examples/lazy/src/main.rs b/examples/lazy/src/main.rs index 01560598..04df0744 100644 --- a/examples/lazy/src/main.rs +++ b/examples/lazy/src/main.rs @@ -178,35 +178,23 @@ impl Sandbox for App { } }); - column( - items - .into_iter() - .map(|item| { - let button = button("Delete") - .on_press(Message::DeleteItem(item.clone())) - .style(theme::Button::Destructive); - - row![ - text(&item.name) - .style(theme::Text::Color(item.color.into())), - horizontal_space(Length::Fill), - pick_list( - Color::ALL, - Some(item.color), - move |color| { - Message::ItemColorChanged( - item.clone(), - color, - ) - } - ), - button - ] - .spacing(20) - .into() - }) - .collect(), - ) + column(items.into_iter().map(|item| { + let button = button("Delete") + .on_press(Message::DeleteItem(item.clone())) + .style(theme::Button::Destructive); + + row![ + text(&item.name) + .style(theme::Text::Color(item.color.into())), + horizontal_space(Length::Fill), + pick_list(Color::ALL, Some(item.color), move |color| { + Message::ItemColorChanged(item.clone(), color) + }), + button + ] + .spacing(20) + .into() + })) .spacing(10) }); |