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

Implement content_fit for viewer widget #2330

Merged
merged 12 commits into from
Jun 17, 2024

Conversation

Gigas002
Copy link
Contributor

@Gigas002 Gigas002 commented Mar 15, 2024

Implemented content_fit property for viewer widget to have the same behavior, image widget has. That required rework of image_size function and minor rework of draw and layout functions.
Below are examples of how it's working.

On the left side is viewer widget, on the right side is image widget.

Contain

contain.mp4

Cover

cover.mp4

Fill

fill.mp4

None

none.mp4

ScaleDown

scale_down.mp4

@hecrj hecrj added this to the 0.13 milestone May 3, 2024
@Gigas002
Copy link
Contributor Author

Gigas002 commented May 8, 2024

Resolved merge conflict, sorry!

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 reasonable! Thanks 🥳

@hecrj hecrj merged commit 368b15f into iced-rs:master Jun 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants