summaryrefslogtreecommitdiffstats
path: root/web/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 16:02:30 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 16:02:30 +0700
commit3140cdc4babcefc444f1c1d30eb0f5f4ed1df054 (patch)
treeb3ea963a73118d5f0bfd7d875ba776ee51466f9b /web/src/widget
parent95acc1deb89c4e75b513edb0f4d53b83c7f75b30 (diff)
downloadiced-3140cdc4babcefc444f1c1d30eb0f5f4ed1df054.tar.gz
iced-3140cdc4babcefc444f1c1d30eb0f5f4ed1df054.tar.bz2
iced-3140cdc4babcefc444f1c1d30eb0f5f4ed1df054.zip
Wire up styling to `Button` in `iced_native`
Diffstat (limited to 'web/src/widget')
-rw-r--r--web/src/widget/button.rs6
1 files changed, 3 insertions, 3 deletions
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<dyn StyleSheet>,
+ 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<Box<dyn StyleSheet>>) -> Self {
- self.style = style.into();
+ pub fn style(mut self, style: &'a dyn StyleSheet) -> Self {
+ self.style = style;
self
}