diff options
author | 2024-07-12 15:11:30 +0200 | |
---|---|---|
committer | 2024-07-12 15:14:43 +0200 | |
commit | f9dd5cbb099bbe44a57b6369be54a442363b7a8d (patch) | |
tree | fe16084bc47faadc32d698aa446ea202f7949a4c /examples/styling | |
parent | be06060117da061ad8cad94ab0830c06def6b147 (diff) | |
download | iced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.tar.gz iced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.tar.bz2 iced-f9dd5cbb099bbe44a57b6369be54a442363b7a8d.zip |
Introduce helper methods for alignment for all widgets
Diffstat (limited to 'examples/styling')
-rw-r--r-- | examples/styling/src/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 3124493b..8f979ea8 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -3,7 +3,7 @@ use iced::widget::{ row, scrollable, slider, text, text_input, toggler, vertical_rule, vertical_space, }; -use iced::{Alignment, Element, Length, Theme}; +use iced::{Element, Length, Theme}; pub fn main() -> iced::Result { iced::application("Styling - Iced", Styling::update, Styling::view) @@ -88,9 +88,7 @@ impl Styling { let content = column![ choose_theme, horizontal_rule(38), - row![text_input, button] - .spacing(10) - .align_items(Alignment::Center), + row![text_input, button].spacing(10).center_y(), slider, progress_bar, row![ @@ -100,7 +98,7 @@ impl Styling { ] .spacing(10) .height(100) - .align_items(Alignment::Center), + .center_y(), ] .spacing(20) .padding(20) |