diff options
Diffstat (limited to 'native/src/widget')
| -rw-r--r-- | native/src/widget/radio.rs | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index afe85b76..eb732dc3 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -53,7 +53,7 @@ pub struct Radio<'a, Message, Renderer: text::Renderer> {      text_size: Option<u16>,      text_color: Option<Color>,      font: Renderer::Font, -    style_sheet: &'a dyn StyleSheet, +    style_sheet: Box<dyn StyleSheet + 'a>,  }  impl<'a, Message, Renderer: text::Renderer> Radio<'a, Message, Renderer> @@ -135,8 +135,11 @@ where      }      /// Sets the style of the [`Radio`] button. -    pub fn style(mut self, style_sheet: &'a dyn StyleSheet) -> Self { -        self.style_sheet = style_sheet; +    pub fn style( +        mut self, +        style_sheet: impl Into<Box<dyn StyleSheet + 'a>>, +    ) -> Self { +        self.style_sheet = style_sheet.into();          self      }  } | 
