summaryrefslogtreecommitdiffstats
path: root/examples/modal/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-02-15 02:57:52 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-15 02:57:52 +0100
commit84cc9f130b4e29219d47db42cdb76548b054c66b (patch)
tree5758716b7ca1a35e589969efd9537f5e56dd1e27 /examples/modal/src
parent5827023ccc3f80012b17dbfe778fbd8b63186c99 (diff)
parent777e2e34f50c440f59d9a407f75be80fbbfaccae (diff)
downloadiced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.gz
iced-84cc9f130b4e29219d47db42cdb76548b054c66b.tar.bz2
iced-84cc9f130b4e29219d47db42cdb76548b054c66b.zip
Merge pull request #2253 from iced-rs/improve-ergonomics
Improve some widget ergonomics
Diffstat (limited to 'examples/modal/src')
-rw-r--r--examples/modal/src/main.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs
index 6fe951ee..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)
@@ -157,7 +153,7 @@ impl Application for App {
text_input("", &self.password)
.on_input(Message::Password)
.on_submit(Message::Submit)
- .password()
+ .secure(true)
.padding(5),
]
.spacing(5),