From e914888f57394e4b67b40e42f1ad9df4ae8147e6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 18:40:39 +0700 Subject: Implement `Widget::draw` for `TextInput` --- 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 34d18fc9..cca94c8f 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -77,7 +77,7 @@ impl Sandbox for Styling { ) .padding(10) .size(20) - .style(self.theme); + .style(self.theme.into()); let button = Button::new(&mut self.button, Text::new("Submit")) .padding(10) @@ -194,11 +194,11 @@ mod style { } } - impl From for Box { + impl From for &'static dyn text_input::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::TextInput.into(), + Theme::Dark => &dark::TextInput, } } } -- cgit