diff options
author | 2024-07-12 15:11:30 +0200 | |
---|---|---|
committer | 2024-07-12 15:14:43 +0200 | |
commit | f9dd5cbb099bbe44a57b6369be54a442363b7a8d (patch) | |
tree | fe16084bc47faadc32d698aa446ea202f7949a4c /examples/custom_shader/src/main.rs | |
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/custom_shader/src/main.rs')
-rw-r--r-- | examples/custom_shader/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs index b04a8183..3e29e7be 100644 --- a/examples/custom_shader/src/main.rs +++ b/examples/custom_shader/src/main.rs @@ -6,7 +6,7 @@ use iced::time::Instant; use iced::widget::shader::wgpu; use iced::widget::{center, checkbox, column, row, shader, slider, text}; use iced::window; -use iced::{Alignment, Color, Element, Length, Subscription}; +use iced::{Color, Element, Length, Subscription}; fn main() -> iced::Result { iced::application( @@ -122,12 +122,12 @@ impl IcedCubes { let controls = column![top_controls, bottom_controls,] .spacing(10) .padding(20) - .align_items(Alignment::Center); + .center_x(); let shader = shader(&self.scene).width(Length::Fill).height(Length::Fill); - center(column![shader, controls].align_items(Alignment::Center)).into() + center(column![shader, controls].center_x()).into() } fn subscription(&self) -> Subscription<Message> { |