summaryrefslogtreecommitdiffstats
path: root/examples/toast
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 15:11:30 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 15:14:43 +0200
commitf9dd5cbb099bbe44a57b6369be54a442363b7a8d (patch)
treefe16084bc47faadc32d698aa446ea202f7949a4c /examples/toast
parentbe06060117da061ad8cad94ab0830c06def6b147 (diff)
downloadiced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.tar.gz
iced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.tar.bz2
iced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.zip
Introduce helper methods for alignment for all widgets
Diffstat (limited to 'examples/toast')
-rw-r--r--examples/toast/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs
index 232133b1..fd7f07c2 100644
--- a/examples/toast/src/main.rs
+++ b/examples/toast/src/main.rs
@@ -4,7 +4,7 @@ use iced::keyboard::key;
use iced::widget::{
self, button, center, column, pick_list, row, slider, text, text_input,
};
-use iced::{Alignment, Element, Length, Subscription, Task};
+use iced::{Element, Length, Subscription, Task};
use toast::{Status, Toast};
@@ -142,7 +142,7 @@ impl App {
.spacing(5)
.into()
),
- column![add_toast].align_items(Alignment::End)
+ column![add_toast].center_x()
]
.spacing(10)
.max_width(200),
@@ -245,7 +245,7 @@ mod toast {
.on_press((on_close)(index))
.padding(3),
]
- .align_items(Alignment::Center)
+ .center_y()
)
.width(Length::Fill)
.padding(5)