summaryrefslogtreecommitdiffstats
path: root/examples/download_progress
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-05 17:24:43 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 10:01:49 +0100
commit22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5 (patch)
tree22214a4ac6bca5033f6d5a227934288019f6ca60 /examples/download_progress
parent0322e820eb40d36a7425246278b7bcb22b7010aa (diff)
downloadiced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.tar.gz
iced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.tar.bz2
iced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.zip
Introduce `Widget::size_hint` and fix further layout inconsistencies
Diffstat (limited to 'examples/download_progress')
-rw-r--r--examples/download_progress/src/main.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/download_progress/src/main.rs b/examples/download_progress/src/main.rs
index a2fcb275..675e9e26 100644
--- a/examples/download_progress/src/main.rs
+++ b/examples/download_progress/src/main.rs
@@ -73,16 +73,15 @@ impl Application for Example {
}
fn view(&self) -> Element<Message> {
- let downloads = Column::with_children(
- self.downloads.iter().map(Download::view).collect(),
- )
- .push(
- button("Add another download")
- .on_press(Message::Add)
- .padding(10),
- )
- .spacing(20)
- .align_items(Alignment::End);
+ let downloads =
+ Column::with_children(self.downloads.iter().map(Download::view))
+ .push(
+ button("Add another download")
+ .on_press(Message::Add)
+ .padding(10),
+ )
+ .spacing(20)
+ .align_items(Alignment::End);
container(downloads)
.width(Length::Fill)