Show image dimensions in preview#1357
Open
MoonMao42 wants to merge 3 commits intop0deje:masterfrom
Open
Conversation
weisJ
reviewed
Apr 15, 2026
Collaborator
weisJ
left a comment
There was a problem hiding this comment.
Looking good. Though can you put the image dimension above the general info. This move the size closer to the image and avoid jumping text between different types of copies.
NSImage.size returns points, not pixels. On Retina displays, this shows scaled-down dimensions. Use NSBitmapImageRep.pixelsWide/pixelsHigh to get the real image resolution, with fallback to size when no bitmap representation is available.
cb021d8 to
897fb08
Compare
Author
|
Moved it above the general info. Now the lower rows don't shift when you switch between image and text items. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1139.
Displays pixel dimensions (e.g. "500×300") in the preview panel when hovering over an image clipboard entry. The dimensions line only appears for image items.
Changes:
PreviewItemViewthat reads the image size from the clipboard data.lproj/PreviewItemView.stringsfiles (non-English files use English as placeholder for Weblate to translate)