Make Button::background generic
This commit is contained in:
parent
f87ddf1056
commit
e92ea48e88
7 changed files with 21 additions and 20 deletions
|
|
@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- `Button::background` takes an `Into<Background>` now instead of a `Background`.
|
||||
|
||||
### Fixed
|
||||
- Render not being scheduled after `Command` futures finishing.
|
||||
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ impl<'a, Message> Button<'a, Message> {
|
|||
///
|
||||
/// [`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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue