Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Show pixel info under the mouse when previewing image. #5944

Merged
merged 20 commits into from
Nov 11, 2013

Conversation

RaymondLim
Copy link
Contributor

Showing the image tip on the top right of the cursor until there is no room on the right. When no room on the right, then the image tip shows up on the top left of the cursor. We draw two crossing guides to indicate the cursor location. But for an image that is narrow than 20 pixels in width or height, we also show the crosshair cursor since the guides are pretty useless for small images.

// If the image size is too narrow in width or height, then
// show the crosshair cursor since guides are almost invisible
// in narrow images.
if (this.naturalWidth < 20 || this.naturalHeight < 20) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to factor in the scale, i.e. if you have an image that is 22px but you are only seeing it at 27 percent (as possible i.e. when viewing brackets/src/style/images/active_black.png - very wide and small) you'd still not see th crosshair, but it would be useful, the mous position is a bit difficult to see.
screen shot 2013-11-11 at 3 03 47 pm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! fixed.

@couzteau
Copy link
Member

Done with review for now.

@RaymondLim
Copy link
Contributor Author

@couzteau Ready for re-review.

@couzteau
Copy link
Member

Done with review. Works great. Preview Images much improved! Merging.

couzteau added a commit that referenced this pull request Nov 11, 2013
Show pixel info under the mouse when previewing image.
@couzteau couzteau merged commit e1bc7b6 into master Nov 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants