Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
thecoolwinter wants to merge1 commit intoCodeEditApp:main
base:main
Choose a base branch
Loading
fromthecoolwinter:fix/image-preview-size

Conversation

@thecoolwinter
Copy link
Collaborator

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

  • RemovedImageFileView as it was redundant after removing the image size restriction.
  • Adjusted a nestedif statement inNonTextFileView after removingImageFileView.

Related Issues

Checklist

  • I read and understood thecontributing guide as well as thecode of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

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

@thecoolwinterthecoolwinter changed the titleFix Image Previews Have Constant SizeFix: Image Previews Have Constant SizeJul 7, 2025
@austincondiff
Copy link
Collaborator

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
Copy link
CollaboratorAuthor

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.If we could even set the initial zoom level it'd be a different story. I just found that theQLPreviewController takes a delegate that lets us doexactly that. I'll see if I can refactor this to use QLPreviewController instead of QLPreviewView and make the changes to set the initial zoom level.

@thecoolwinterthecoolwinter marked this pull request as draftJuly 11, 2025 16:31
@thecoolwinter
Copy link
CollaboratorAuthor

@austincondiffQLPreviewController is only available on iOS so we're back to where we started here. I think the best UX will be to letQLPreviewView decide the size and allow the user to zoom it correctly.

@Lancelotbronner
Copy link

@austincondiffQLPreviewController is only available on iOS so we're back to where we started here. I think the best UX will be to letQLPreviewView decide the size and allow the user to zoom it correctly.

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!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

🐞 Image Zoom Doesnt Increase Image Size in Editor

3 participants

@thecoolwinter@austincondiff@Lancelotbronner

[8]ページ先頭

©2009-2025 Movatter.jp