summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:45:57 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:45:57 +0700
commit0d3c9ef7bd3d0a0abecdf8e8b5391e32773ca20e (patch)
tree77b8c4282e3baec2a7ac6c18eff923d296d2a11a /examples
parent0c76e0307ff7d4450c354812f8a25047f24948b4 (diff)
downloadiced-0d3c9ef7bd3d0a0abecdf8e8b5391e32773ca20e.tar.gz
iced-0d3c9ef7bd3d0a0abecdf8e8b5391e32773ca20e.tar.bz2
iced-0d3c9ef7bd3d0a0abecdf8e8b5391e32773ca20e.zip
Reintroduce `Box` for `style_sheet` in `TextInput`
Diffstat (limited to 'examples')
-rw-r--r--examples/styling/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs
index b33e26de..262db03e 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.into());
+ .style(self.theme);
let button = Button::new(&mut self.button, Text::new("Submit"))
.padding(10)
@@ -194,11 +194,11 @@ mod style {
}
}
- impl From<Theme> for &'static dyn text_input::StyleSheet {
+ impl<'a> From<Theme> for Box<dyn text_input::StyleSheet + 'a> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
- Theme::Dark => &dark::TextInput,
+ Theme::Dark => dark::TextInput.into(),
}
}
}