summaryrefslogtreecommitdiffstats
path: root/examples/gradient
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-07-12 21:40:46 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-12 21:40:46 +0200
commit8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7 (patch)
tree826fa9e0acdf3a4e003f882c94ff24a4ac9f50e4 /examples/gradient
parentbe06060117da061ad8cad94ab0830c06def6b147 (diff)
parent3f480d3d18c41188bf40ead0a3dc4497316f11ae (diff)
downloadiced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.gz
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.bz2
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.zip
Merge pull request #2504 from iced-rs/view-ergonomics
Improved `view` ergonomics
Diffstat (limited to 'examples/gradient')
-rw-r--r--examples/gradient/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs
index e5b19443..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::{Alignment, 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)
- .align_items(Alignment::Center);
+ .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)
- .align_items(Alignment::Center)
+ .align_y(Center)
.into()
}