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

MenuBar icon only in greyscale? #142

Closed
sudodaemon opened this issue Aug 24, 2023 · 7 comments
Closed

MenuBar icon only in greyscale? #142

sudodaemon opened this issue Aug 24, 2023 · 7 comments

Comments

@sudodaemon
Copy link

I have added a menu bar icon, but even thought the PNG file is in color it pulls up as greyscale. Is there a setting I am missing or is this expected behavior?

@meta-github
Copy link

Renderlng the icon as grayscale is currently hardcoded in the app, iirc. I think, this is to ensure that the alert flags are properly visible.

To display our company logo correctly, I have disabled the option to do the grayscaling as and changed the colors of the alerts.

@sudodaemon
Copy link
Author

So wait, is there a way to disable the grayscale option? First you said its hard coded, then you said you disabled it...

@meta-github
Copy link

Yes, I disabled it by changing the source code.

@sudodaemon
Copy link
Author

Could you point me in the right direction? I've been looking through a bunch of files but can't find anything relating to color other than dark mode, light mode, etc. Can't find anything relating to the menubar / notification icon.

@meta-github
Copy link

Look at src/Support/AppDelegate.swift:

uncomment the line button.image?.isTemplate = true and (optionally) change these lines for other colors: leStatusItemBadgeView(frame: .zero, color: .systemRed) and StatusItemBadgeView(frame: .zero, color: .systemOrange).

@sudodaemon
Copy link
Author

Just in case anybody else is trying to do this, I found that the line wasn't commented out, it was just listed as True, so setting it to False was the key.

So it should be

button.image?.isTemplate = false

Maybe it was a typo on your end? Doesn't matter, point is, it fixed my issue and I am happy. Icon is in color now and it's been pushed out to all the computers I manage.

@jordywitteman
Copy link
Contributor

Will close this issue as it is resolved by recompiling after code changes. We feel we should not provide the non-template option in the release version to maintain the native look and feel of the menu bar icon. Generally speaking, it should blend in nicely with the rest of the icons and adapt to changes like wallpaper and light/dark mode.

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

No branches or pull requests

3 participants