-
Notifications
You must be signed in to change notification settings - Fork 568
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
fix layout of image when either width or height is bounded, but not the other #1189
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.
I'm not qualified to review the unit test but the logic seems sound 👍
cc @cmyr I think you're the master of the rendering test system, can you take a look at the unit test here? |
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.
Given that the pixel interpolation and scaling has already been tested, probably it would be enough to just test the image's layout rect? You can look at the layout tests for an example.
I made the tests test just the layout, it works well. I tested that the old implementation would indeed fail. |
@jneem can you remove the |
Right, sorry for letting this sit. There's a conflict in the CHANGELOG now, but otherwise it looks good to go. |
I think the changes were made, right?
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.
Yeppers! My nits have been addressed :)
This took a bit longer than expected, I fixed some bugs with the renaming and behavior changes around the scrollbar and image buffer. |
Thanks for your patience on this! I just see a merge conflict on the changelog, but otherwise I'm ready to merge. |
oops! I should find a way to make vscode not auto-format .MD files, or highlight merge conflicts in vim. It was very nice to work on this, I might try to fix more small things once I have time. |
At some point the number for the PR in the changelog link became incorrect. Later tonight I'm going to take the liberty of fixing that then merge this. This message mostly serves as a note to any other collaborators that this change needs to be made real quick before merging |
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.
Well nevermind lol, the allow edits box was unchecked. Very very minor change here and then we can merge I promise
This PR fixes #1184 with a more considerate layout function never taking +infinite in size.