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

image viewer: Only calculate viewport based width/length for Length::Unit|Shrink #885

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

Chiheisen
Copy link
Contributor

Currently image::viewer will not expand it's image into empty space even when Length::Fill or Length::FillPortion are used and space is available.

This is because height/width is always calculated with viewport. In my eyes, viewport shouldn't have an influence if the layout size isn't constrained to the size that the viewport is limiting to.
Instead of always, only calculate viewport based length/width when the image has Length::Unit or Length::Shrink.

I might be missing something, so corrections are very welcome.

Fixes #878

Currently image::viewer will not expand it's image into empty space even
when Length::Fill or Length::FillPortion are used. Only calculate
viewport when viewer cannot expand.
@hecrj hecrj added the feature New feature or request label May 25, 2021
@hecrj hecrj added this to the 0.4.0 milestone May 25, 2021
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.

Thank you!

I am not the main author of this widget, so I am not completely sure of the original use case. However, I believe the changes seem reasonable.

Let's merge! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image Viewer bounds expansion when zooming
2 participants