Skip to content

Commit 2c51e34

Browse files
authored
Merge pull request #2046 from dtzxporter/dtzxporter-patch-1
Support automatic style type casting for Buttons.
2 parents 404f497 + 63c5f62 commit 2c51e34

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Changed
1212
- Updated `wgpu` to `0.17`. [#2065](https://github.com/iced-rs/iced/pull/2065)
13+
- Changed `Button::style` to take an `impl Into<...>` for consistency. [#2046](https://github.com/iced-rs/iced/pull/2046)
1314

1415
### Fixed
1516
- Missing `width` attribute in `styling` example. [#2062](https://github.com/iced-rs/iced/pull/2062)
1617

1718
Many thanks to...
1819

1920
- @akshayr-mecha
21+
- @dtzxporter
2022

2123
## [0.10.0] - 2023-07-28
2224
### Added

widget/src/button.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ where
119119
/// Sets the style variant of this [`Button`].
120120
pub fn style(
121121
mut self,
122-
style: <Renderer::Theme as StyleSheet>::Style,
122+
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
123123
) -> Self {
124-
self.style = style;
124+
self.style = style.into();
125125
self
126126
}
127127
}

0 commit comments

Comments
 (0)