summaryrefslogtreecommitdiffstats
path: root/examples/styling
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 18:40:39 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 18:40:39 +0700
commite914888f57394e4b67b40e42f1ad9df4ae8147e6 (patch)
tree8aa199ea229941e7861e63b0b6bd7994dbca3ede /examples/styling
parent954d6349a8cd5505d99403285ce9617c65a63a2b (diff)
downloadiced-e914888f57394e4b67b40e42f1ad9df4ae8147e6.tar.gz
iced-e914888f57394e4b67b40e42f1ad9df4ae8147e6.tar.bz2
iced-e914888f57394e4b67b40e42f1ad9df4ae8147e6.zip
Implement `Widget::draw` for `TextInput`
Diffstat (limited to 'examples/styling')
-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 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<Theme> for Box<dyn text_input::StyleSheet> {
+ impl From<Theme> 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,
}
}
}