From 3140cdc4babcefc444f1c1d30eb0f5f4ed1df054 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Oct 2021 16:02:30 +0700 Subject: Wire up styling to `Button` in `iced_native` --- web/src/widget/button.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/src/widget') diff --git a/web/src/widget/button.rs b/web/src/widget/button.rs index cd450b55..1ae78201 100644 --- a/web/src/widget/button.rs +++ b/web/src/widget/button.rs @@ -51,7 +51,7 @@ pub struct Button<'a, Message> { #[allow(dead_code)] min_height: u32, padding: Padding, - style: Box, + style: &'a dyn StyleSheet, } impl<'a, Message> Button<'a, Message> { @@ -104,8 +104,8 @@ impl<'a, Message> Button<'a, Message> { } /// Sets the style of the [`Button`]. - pub fn style(mut self, style: impl Into>) -> Self { - self.style = style.into(); + pub fn style(mut self, style: &'a dyn StyleSheet) -> Self { + self.style = style; self } -- cgit