Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple image::Handle from iced_native and lower trait bound on text::Renderer::Font #1155

Merged
merged 2 commits into from
Dec 13, 2021

Conversation

AlisCode
Copy link
Contributor

As discussed on discord, the goal of this PR is to make iced_native's widgets usable in more contexts (including potentially a Backend for a well-known Rust game engine, who knows 👀 ) by :

  • Making the image renderer use an associated type Handle instead of relying on iced_native's image::Handle which is impractical for custom backends
  • Lowering the bound of a Font handle from Copy to Clone

This is a breaking change for iced_native because any custom renderer will need to add the associated type Handle to the text::Renderer implementation.

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks! 🎉

@hecrj hecrj added the improvement An internal improvement label Dec 13, 2021
@hecrj hecrj added this to the 0.4.0 milestone Dec 13, 2021
@hecrj hecrj changed the title Decouple image handle from iced_native, lower trait bound on Font handle Decouple image::Handle from iced_native and lower trait bound on text::Renderer::Font Dec 13, 2021
@hecrj hecrj merged commit e24eaa7 into iced-rs:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An internal improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants