summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/button.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs
index 023c4ee8..3348c58c 100644
--- a/native/src/widget/button.rs
+++ b/native/src/widget/button.rs
@@ -89,8 +89,8 @@ impl<'a, Message, Renderer> Button<'a, Message, Renderer> {
///
/// [`Button`]: struct.Button.html
/// [`Background`]: ../../struct.Background.html
- pub fn background(mut self, background: Background) -> Self {
- self.background = Some(background);
+ pub fn background<T: Into<Background>>(mut self, background: T) -> Self {
+ self.background = Some(background.into());
self
}