From d61cb58d92b6fcd520f665deb093f3747ffd5e5c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 15:36:32 +0700 Subject: Wire up `container` styling to `iced_native` --- examples/styling/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/styling/src/main.rs') diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 1746d7b4..d8254dd9 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -149,7 +149,7 @@ impl Sandbox for Styling { .height(Length::Fill) .center_x() .center_y() - .style(self.theme) + .style(self.theme.into()) .into() } } @@ -176,11 +176,11 @@ mod style { } } - impl From for Box { + impl From for &'static dyn container::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::Container.into(), + Theme::Dark => &dark::Container, } } } -- cgit