diff options
author | 2024-02-15 02:08:22 +0100 | |
---|---|---|
committer | 2024-02-15 02:08:22 +0100 | |
commit | e8049af23dbf4988ff24b75b90104295f61098a2 (patch) | |
tree | 21840d4799c0645d9572af6d44c58bd7be117a39 /examples/modal | |
parent | 9dd20ead085ff3b9b4bd441b5e4938cf8e813f35 (diff) | |
download | iced-e8049af23dbf4988ff24b75b90104295f61098a2.tar.gz iced-e8049af23dbf4988ff24b75b90104295f61098a2.tar.bz2 iced-e8049af23dbf4988ff24b75b90104295f61098a2.zip |
Make `horizontal_space` and `vertical_space` fill by default
Diffstat (limited to 'examples/modal')
-rw-r--r-- | examples/modal/src/main.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index 1dac0075..938ce32c 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -111,13 +111,9 @@ impl Application for App { fn view(&self) -> Element<Message> { let content = container( column![ - row![ - text("Top Left"), - horizontal_space(Length::Fill), - text("Top Right") - ] - .align_items(Alignment::Start) - .height(Length::Fill), + row![text("Top Left"), horizontal_space(), text("Top Right")] + .align_items(Alignment::Start) + .height(Length::Fill), container( button(text("Show Modal")).on_press(Message::ShowModal) ) @@ -127,7 +123,7 @@ impl Application for App { .height(Length::Fill), row![ text("Bottom Left"), - horizontal_space(Length::Fill), + horizontal_space(), text("Bottom Right") ] .align_items(Alignment::End) |