large images are not scaled to stay inside diff panel
See original GitHub issueDescription
With the new image diff improvements in #2383 there’s a scenario where a large image is drawn outside the diff panel. We shouldn’t do this.
Version
GitHub Desktop version: current master
e.g. 82b1d2377b98208d74aff0337c8f482cef2c1e35
OS version: Windows 10
Steps to Reproduce
- Clone https://github.com/shiftkey/image-examples
- Switch to History tab
- Select this commit https://github.com/shiftkey/image-examples/commit/10c1cf4d08b884f83332d8ae24e14336c5ad73df
- Ensure you have
2-up
selected (but the others show this problem too)
Expected behavior:
- Image does not display outside diff view.
- Can toggle between different modes.
Actual behavior:
- Image drawn over top menu.
- Unable to change diff mode.
Reproduces how often: 100%
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:19 (14 by maintainers)
Top Results From Across the Web
Image sizing and scaling in SharePoint modern pages
Modern pages and web parts are designed to be fully responsive across devices, meaning that images used in web parts will scale differently...
Read more >How to use Nvidia Image Scaling | Rock Paper Shotgun
Step 1: Open up Nvidia Control Panel and click “Manage 3D settings”. Under Global Settings, you should see the Image Scaling setting at...
Read more >Keeping the Same Scale Size when Updating or Relinking to ...
How to tell InDesign to stop scaling images when the dimensions change. ... You need the scaling to remain the same. The solution...
Read more >How to Serve Scaled Images on WordPress Website - Hostinger
Serving scaled images involves optimizing images by refitting them into the perfect size – not too small, not too large.
Read more >Resize Images Without Losing Quality with Photoshop Smart ...
Learn how to scale and resize images in Photoshop without losing quality using smart objects! You'll learn the difference between resizing a normal...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been able to reproduce this on Windows 10 and I think it’s some combination of scaling and screen real-estate.
This is the commit I’m working with (thanks @AndyThePie for the setup): https://github.com/AndyThePie/pizzaRPG-repo/commit/0233f1c56771ddf2d72f71c800d3f2ac86ef18ed
At 100% scaling on a 1440x900px display, the image diff is scaled down to fit into the space:
At 200% scaling on a 2560x1440px display, the image is no longer scaled down:
Probably requires some refreshing of what the image diff controls are rendering and whether they care about the available space…
I use 125% zoom and I have this issue very frequently in an image-heavy repository. It can cover the branch/fetch buttons in the changes view, and always covers the diff view options in the history view. I have to resize down to 100% to work with this repository.