diff options
author | 2024-01-10 10:08:11 +0100 | |
---|---|---|
committer | 2024-01-10 10:08:11 +0100 | |
commit | 226271148e77a4f8966ce84b0c948c268176d92b (patch) | |
tree | f3830d78f064becb762a17cbae9973e4541b1491 /examples/layout | |
parent | a6cbc365037d740ee9bb8d21fffe361cd198477e (diff) | |
download | iced-226271148e77a4f8966ce84b0c948c268176d92b.tar.gz iced-226271148e77a4f8966ce84b0c948c268176d92b.tar.bz2 iced-226271148e77a4f8966ce84b0c948c268176d92b.zip |
Use multiple squares instead of `vertical_space` in `layout` example
Diffstat (limited to 'examples/layout')
-rw-r--r-- | examples/layout/src/main.rs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/examples/layout/src/main.rs b/examples/layout/src/main.rs index 3e69e1a8..60dabe54 100644 --- a/examples/layout/src/main.rs +++ b/examples/layout/src/main.rs @@ -4,7 +4,7 @@ use iced::mouse; use iced::theme; use iced::widget::{ button, canvas, checkbox, column, container, horizontal_space, pick_list, - row, scrollable, text, vertical_rule, vertical_space, + row, scrollable, text, vertical_rule, }; use iced::{ color, Alignment, Application, Color, Command, Element, Font, Length, @@ -284,9 +284,19 @@ fn application<'a>() -> Element<'a, Message> { .center_y(); let content = container( - scrollable(column!["Content!", vertical_space(2000), "The end"]) - .width(Length::Fill) - .height(Length::Fill), + scrollable( + column![ + "Content!", + square(400), + square(200), + square(400), + "The end" + ] + .spacing(40) + .align_items(Alignment::Center) + .width(Length::Fill), + ) + .height(Length::Fill), ) .padding(10); |