Fix: Image Previews Have Constant Size#2079
Fix: Image Previews Have Constant Size#2079thecoolwinter wants to merge 1 commit intoCodeEditApp:mainfrom
Conversation
|
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. |
I agree, that's annoying. The issue is we can't control the zoom level. |
|
@austincondiff |
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