Merge pull request #2046 from dtzxporter/dtzxporter-patch-1

Support automatic style type casting for Buttons.
This commit is contained in:
Héctor Ramón 2023-09-03 09:10:16 +02:00 committed by GitHub
commit 2c51e3478b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated `wgpu` to `0.17`. [#2065](https://github.com/iced-rs/iced/pull/2065)
- Changed `Button::style` to take an `impl Into<...>` for consistency. [#2046](https://github.com/iced-rs/iced/pull/2046)
### Fixed
- Missing `width` attribute in `styling` example. [#2062](https://github.com/iced-rs/iced/pull/2062)
@ -17,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Many thanks to...
- @akshayr-mecha
- @dtzxporter
## [0.10.0] - 2023-07-28
### Added

View file

@ -119,9 +119,9 @@ where
/// Sets the style variant of this [`Button`].
pub fn style(
mut self,
style: <Renderer::Theme as StyleSheet>::Style,
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
) -> Self {
self.style = style;
self.style = style.into();
self
}
}