Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.1k
Fix: Image Previews Have Constant Size#2079
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
austincondiff commentedJul 10, 2025
Some images are small. Filing the space would mean a very pixelated image. Ideally there would be a threshold of some kind so smaller images show actual pixels but still are zoom-able. |
thecoolwinter commentedJul 11, 2025
I agree, that's annoying. The issue is we can't control the zoom level. |
thecoolwinter commentedJul 17, 2025
@austincondiff |
Lancelotbronner commentedNov 8, 2025
Working a lot with pixelated images, that would be my preference. If my image is small I expect it to be pixelated and can just zoom out, no big deal! |
Description
Right now, CodeEdit attempts to display image previews at image's native resolution. This is done by restricting the view's size to the image's size. However, the preview view is scrollable and zoomable. This leads to issues like brought up in#2066 where the image is small.
This change removes the restricted size for image previews. This means they now fill the available editor space by default. They can still be zoomed, and their resolution is still listed in the status bar.
Detailed Changes
ImageFileViewas it was redundant after removing the image size restriction.ifstatement inNonTextFileViewafter removingImageFileView.Related Issues
Checklist
Screenshots
Before, image is displayed at native resolution but has inset scroll bars and doesn't correctly zoom:
Screen.Recording.2025-07-07.at.3.02.01.PM.mov
With change, image is zoomed to fit width but has correct scrolling and zooming UI and UX:
Screen.Recording.2025-07-07.at.3.02.20.PM.mov