-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ContentFit support for images #1219
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thank you 🥳
I just have a couple of small suggestions!
(as per recommendations on iced-rs#1219)
Alright, that should be everything! Any other thoughts? |
Should I include a patch for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🥳 Thank you 🙇
I made some changes here and there, since I realized we could add ContentFit
support for the Svg
widget as well!
Let me know what you think and we can merge this! 🚢
Should I include a patch for the iced_pure image widget in this PR too now that that exists, or should that be a separate PR?
Don't worry! The changes there haven't landed yet. I can deal with the conflicts :)
Since we are just exposing the `ContentFit` type and not the module `image` at all.
... just for consistency!
Wide ferris is cute :3
Looks great! My two concerns with the large & transparent Ferris image are that, because she doesn't have a background, it's hard to tell where the border is, and that it can't showcase the |
I think I have removed the other two from the Thank you again! 🙇 Let's merge this! |
Closes #1179
Closes #1014
Adds support for various image fit modes, documented and explained in the new
fit
module and explained in #1179.Additionally, the
tour
example has been updated to show off the new functionality. To this end, an additional image was added to thetour
example which satisfies the need for a background (to clearly denote the bounds of the image) and a size smaller than the screen (so that the special behavior of theScaleDown
mode can be seen).Breaking changes:
fit
field was added to theImage
structheight
property properly, if setNon-breaking Changes:
ContentFit
toiced_core
(and appropriate re-exports)tour
examplefit(ContentFit)
method to theImage
widgetContentFit
sRecommended future work:
fit2.mp4