summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/CHANGELOG.md1
-rw-r--r--native/src/widget/button.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/native/CHANGELOG.md b/native/CHANGELOG.md
index 2a4bba3f..cf5b79dd 100644
--- a/native/CHANGELOG.md
+++ b/native/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- `Image::new` takes an `Into<image::Handle>` now instead of an `Into<String>`. [#90]
+- `Button::background` takes an `Into<Background>` now instead of a `Background`.
### Fixed
- `Image` widget not keeping aspect ratio consistently. [#90]
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
}