Skip to content

Commit

Permalink
Merge pull request #2046 from dtzxporter/dtzxporter-patch-1
Browse files Browse the repository at this point in the history
Support automatic style type casting for Buttons.
  • Loading branch information
hecrj authored Sep 3, 2023
2 parents 404f497 + 63c5f62 commit 2c51e34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ 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)

Many thanks to...

- @akshayr-mecha
- @dtzxporter

## [0.10.0] - 2023-07-28
### Added
Expand Down
4 changes: 2 additions & 2 deletions widget/src/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 2c51e34

Please sign in to comment.