-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
so they don't get covered when zooming
and not just by mouse click
Nice! 💖 |
using transforms caused weird GPU dances
Not sure how far this PR should go. There could still be more improvements or maybe make separate PRs for it? Some ideas:
/cc @thomaslindstrom saw that you contributed earlier, in case you have any feedback. |
Hi, @simurai – great work! This is in part why I've been annoyed with
So with you on that one. This could be fixed by going through each pixel and figuring out if the alpha is
This. Great idea. Not entirely sure how to make the separation between “here is the image” and “this here is just background” clear enough. In “Zoom to fit” mode, the checkered background should be visible, too, imo. “Relying” on the current editor background feels off.
Yes! I'd love to help improving |
@thomaslindstrom Thanks for feedback. The idea with the "Zoom to fit" being the new default was more meant as a "quick view". You just want a quick glance if it's the right image, but not really need any details about the image. Keeping the UI as minimal as possible. Having a transparent background could be an issue, but the chance that it collides with the editor background, still "kinda" small? 😇 Then if you need more infos, you can click on the image and the top "toolbar" shows up with options to change background color, zoom in/out and other ideas like a slider, pixel/border toggle etc. To make it more obvious that you can click on an image, there could be an "show toolbar" button in the corner, like the current background picker.
Yeah, it's always a bit risky changing the current default. A safer way would be to just add the ""Zoom to fit"" as a toggle and maybe in the settings you could choose to have it as the default. |
I like the idea, but in more cases than not, this would result in one extra click for me. I think the safest bet would be merging the two into one view and then having a toggle button like the background color toggle.
Same here, I feel like keeping the checkered background is the safest bet. Seeing nothing that indicates “this is an image” could be confusing. |
👍 ok, I'll try to change it from having 2 "modes" to just a toggle in the toolbar. |
I like the toolbar 👍 |
So you can see the pixels better
after increasing the zoom factor
Something that could still be improved is when in "zoom to fit" mode and start zooming, it snaps to actual size first and zooms from there. The reason is because when using Maybe this can be fixed in another PR. |
Yessssss that looks awesome 👍 |
Awesome work!
Clicking the center might give users the suggestion that they can manually set a percentage value. |
Why not just make the percentage changeable instead of readonly? |
Maybe click to 100% and double click to edit the percentage manually |
I really like the suggestions everyone's making, but I wouldn't want to see this PR bogged down by feature creep - it's already a huge improvement over the current version. IMO it might be good to just make a few final small tweaks and 🚢 this, then refine it further in subsequent PRs to make things more manageable. |
I guess we could do it like OS X that uses an input for the %. Although it's not the default and you have to customize the toolbar to show those controls.
I can take a look how easy it is to change it, but otherwise leaving it for a next PR sounds good too. |
I agree with this 👍 |
Took me a while to figure out how to test this out. cd ~/.atom/packages
rm -rf image-view # shouldn't exist but just in case
git clone https://github.com/atom/image-view.git image-view
git checkout sm-ui-improvements
apm install |
Awesome! Any updates on this? |
Everyone seems to love this, merge please? 🙏 |
Would love this too! I tried the above code and came across an error and realized it still needed to cd ~/.atom/packages
rm -rf image-view # shouldn't exist but just in case
git clone https://github.com/atom/image-view.git image-view
cd image-view # missing line
git checkout sm-ui-improvements
apm install |
The code looks good to me, and as always, your UX is 👌 🌹 💸, @simurai. 🚢 |
@simurai I just tried this out, and it seems like zooming isn't working when the image is constrained horizontally. I saw it working in a GIF near the beginning of the PR, but check out what I'm seeing in my tests: |
@simurai I pushed some changes that make zoom to fit work correctly when horizontally constraining things. My trick was similar to my approach with the pane item views. I used The browser seems to act counterintuitively when computing interactions with containers that are sized via flexbox, but the |
- Not sure, but probably something changed in Chromium how flexbox is implemented
382d965
to
abe2c25
Compare
The "zoom to fit" should work again. Also removed Merge conflict got resolved by merging in |
# Conflicts: # package.json
Awesome. Working correctly. Thanks @simurai! |
This PR adds a few improvements. Mainly
Closes #39 + #37