Merge pull request #2235 from fogarecious/add-from-pathbuf-to-svg-handle
Make the svg function to accept a path
This commit is contained in:
commit
b5b267c31c
2 changed files with 11 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- `Custom` variant to `command::Action`. [#2146](https://github.com/iced-rs/iced/pull/2146)
|
- `Custom` variant to `command::Action`. [#2146](https://github.com/iced-rs/iced/pull/2146)
|
||||||
- Mouse movement events for `MouseArea`. [#2147](https://github.com/iced-rs/iced/pull/2147)
|
- Mouse movement events for `MouseArea`. [#2147](https://github.com/iced-rs/iced/pull/2147)
|
||||||
- Dracula, Nord, Solarized, and Gruvbox variants for `Theme`. [#2170](https://github.com/iced-rs/iced/pull/2170)
|
- Dracula, Nord, Solarized, and Gruvbox variants for `Theme`. [#2170](https://github.com/iced-rs/iced/pull/2170)
|
||||||
|
- `From<T> where T: Into<PathBuf>` for `svg::Handle`. [#2235](https://github.com/iced-rs/iced/pull/2235)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Enable WebGPU backend in `wgpu` by default instead of WebGL. [#2068](https://github.com/iced-rs/iced/pull/2068)
|
- Enable WebGPU backend in `wgpu` by default instead of WebGL. [#2068](https://github.com/iced-rs/iced/pull/2068)
|
||||||
|
|
@ -108,6 +109,7 @@ Many thanks to...
|
||||||
- @Decodetalkers
|
- @Decodetalkers
|
||||||
- @derezzedex
|
- @derezzedex
|
||||||
- @dtzxporter
|
- @dtzxporter
|
||||||
|
- @fogarecious
|
||||||
- @GyulyVGC
|
- @GyulyVGC
|
||||||
- @hicaru
|
- @hicaru
|
||||||
- @ids1024
|
- @ids1024
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,15 @@ impl Handle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> From<T> for Handle
|
||||||
|
where
|
||||||
|
T: Into<PathBuf>,
|
||||||
|
{
|
||||||
|
fn from(path: T) -> Handle {
|
||||||
|
Handle::from_path(path.into())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Hash for Handle {
|
impl Hash for Handle {
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||||
self.id.hash(state);
|
self.id.hash(state);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue