diff options
author | 2024-07-12 18:12:34 +0200 | |
---|---|---|
committer | 2024-07-12 18:12:34 +0200 | |
commit | 76737351ea9e116291112b7d576d9ed4f6bb5c2a (patch) | |
tree | a3b514583ab6f8981fb7656adb9d4d10ce9c466a /examples/gradient | |
parent | f9dd5cbb099bbe44a57b6369be54a442363b7a8d (diff) | |
download | iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.gz iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.bz2 iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.zip |
Re-export variants of `Length` and `alignment` types
Diffstat (limited to 'examples/gradient')
-rw-r--r-- | examples/gradient/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index 018bab82..b2de069f 100644 --- a/examples/gradient/src/main.rs +++ b/examples/gradient/src/main.rs @@ -3,7 +3,7 @@ use iced::gradient; use iced::widget::{ checkbox, column, container, horizontal_space, row, slider, text, }; -use iced::{Color, Element, Length, Radians, Theme}; +use iced::{Center, Color, Element, Fill, Radians, Theme}; pub fn main() -> iced::Result { tracing_subscriber::fmt::init(); @@ -67,8 +67,8 @@ impl Gradient { gradient.into() }) - .width(Length::Fill) - .height(Length::Fill); + .width(Fill) + .height(Fill); let angle_picker = row![ text("Angle").width(64), @@ -77,7 +77,7 @@ impl Gradient { ] .spacing(8) .padding(8) - .center_y(); + .align_y(Center); let transparency_toggle = iced::widget::Container::new( checkbox("Transparent window", transparent) @@ -129,6 +129,6 @@ fn color_picker(label: &str, color: Color) -> Element<'_, Color> { ] .spacing(8) .padding(8) - .center_y() + .align_y(Center) .into() } |