summaryrefslogtreecommitdiffstats
path: root/examples/modal
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-07-12 21:40:46 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-12 21:40:46 +0200
commit8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7 (patch)
tree826fa9e0acdf3a4e003f882c94ff24a4ac9f50e4 /examples/modal
parentbe06060117da061ad8cad94ab0830c06def6b147 (diff)
parent3f480d3d18c41188bf40ead0a3dc4497316f11ae (diff)
downloadiced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.gz
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.bz2
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.zip
Merge pull request #2504 from iced-rs/view-ergonomics
Improved `view` ergonomics
Diffstat (limited to 'examples/modal')
-rw-r--r--examples/modal/src/main.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs
index 413485e7..f1f0e8ad 100644
--- a/examples/modal/src/main.rs
+++ b/examples/modal/src/main.rs
@@ -5,7 +5,7 @@ use iced::widget::{
self, button, center, column, container, horizontal_space, mouse_area,
opaque, pick_list, row, stack, text, text_input,
};
-use iced::{Alignment, Color, Element, Length, Subscription, Task};
+use iced::{Bottom, Color, Element, Fill, Subscription, Task};
use std::fmt;
@@ -96,18 +96,17 @@ impl App {
let content = container(
column![
row![text("Top Left"), horizontal_space(), text("Top Right")]
- .align_items(Alignment::Start)
- .height(Length::Fill),
+ .height(Fill),
center(button(text("Show Modal")).on_press(Message::ShowModal)),
row![
text("Bottom Left"),
horizontal_space(),
text("Bottom Right")
]
- .align_items(Alignment::End)
- .height(Length::Fill),
+ .align_y(Bottom)
+ .height(Fill),
]
- .height(Length::Fill),
+ .height(Fill),
)
.padding(10);