Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tray icon blurry in macOS #199

Closed
BBaoVanC opened this issue Aug 25, 2019 · 13 comments
Closed

Tray icon blurry in macOS #199

BBaoVanC opened this issue Aug 25, 2019 · 13 comments

Comments

@BBaoVanC
Copy link

I have noticed that the tray icon on macOS appears very low-res (about 16x16).
image
Compare to the other tray icons to the right in the above screenshot.

MacBook Pro 13-inch (2560x1600 resolution) -- macOS 10.14.6 -- ElectronMail v3.7.1

@vladimiry
Copy link
Owner

vladimiry commented Aug 26, 2019

The app scales the 128x128 icon down to 16x16 on macOS, related code is here. There was no such scaling initially but macOS was unable to scale big icons automatically, see the respective issue here.

Going to try disabling the downscaling when I get access to macOS system, maybe there will be no described above issue anymore since the app now uses upgraded @electron version.

@andy-asana
Copy link

So what dimensions should our PNG be to avoid blurriness?

@macbugs
Copy link
Contributor

macbugs commented Mar 18, 2022

should be maximum allowed by OS in vertical dimension (22 pixels)
"menu bar icon" - https://iconhandbook.co.uk/reference/chart/osx

@vladimiry
Copy link
Owner

Currently for macOS system the tray icon gets stretched down 128x128 => 16x16 using Lanczos algorithm.

@vladimiry
Copy link
Owner

Can someone test this build (if you do, please specify macOS the version used)? The build comes with 16x16 => 22x22 increased size of the tray image.

@macbugs
Copy link
Contributor

macbugs commented Apr 9, 2022

Tested on Mac OS 12.3
(image depicts "selected" mode with mouse button depressed)

menubar4
note: this looks like 20 pixels to me, but at least the padding is balanced 👍
(and looks much better than Mac OS system icons)
menubar5
However, this icon issue persists.

@vladimiry
Copy link
Owner

Thanks, so going to keep the updated/22x22 image size.

Btw, you can change the icon color to white so it doesn't stand out from the rest of your icons. See #376 (comment) for details.

@vladimiry
Copy link
Owner

However, this icon issue persists.

Same here?

@macbugs
Copy link
Contributor

macbugs commented Apr 9, 2022

Btw, you can change the icon color

I like that... (and wish other apps supported this feature.)
Also here is a browser-based color chooser widget.

Same here?

Same. (Every icon below this size is corrupted)

Screen Shot 2022-04-09 at 16 51 33
Screen Shot 2022-04-09 at 16 50 49

@vladimiry
Copy link
Owner

Same.

I just got a regular image url back instead of used in the app release "data url" hoping maybe @electron has fixed the issue but it's still there. No more workaround ideas at the moment.

@macbugs
Copy link
Contributor

macbugs commented Apr 13, 2022

Problem appears to be corrupted source image file, patch submitted #503

@vladimiry
Copy link
Owner

vladimiry commented Apr 13, 2022

Same here?

Can you retest this build for the notification icon case (this build uses a static PNG icon so #376 (comment) should not effect the notification icon but only tray icon)? As I guess a static icon actually made a trick according to #503 (comment).

vladimiry pushed a commit that referenced this issue Apr 13, 2022
- Fix for corrupted 'Finder' & notification icons
- Refs: #185, #199, #503
vladimiry pushed a commit that referenced this issue Apr 13, 2022
- Fix for corrupted Finder/app-bundle icon.
- Refs: #185, #199, #503
vladimiry pushed a commit that referenced this issue Apr 13, 2022
- Fix for corrupted Finder/app-bundle icon.
- Refs: #185, #199, #503
@vladimiry
Copy link
Owner

Tray icon size customization is going to be available in the next release, see #505 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants