iglance / iGlance

Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
https://iglance.github.io
GNU General Public License v3.0
2.43k stars 123 forks source link

Menu bar icon issue? #229

Open edwardbattistini opened 4 years ago

edwardbattistini commented 4 years ago

Describe the bug🐛 MacOS does not seem to switch the colour of elements who switching from light to dark. Not sure if it is an OS issue or App issue...

To Reproduce

Expected behavior In Light mode iGlance stats icons should be light In dark mode iGlance stats icons should also be light

Screenshots (Optional)

Screenshot 2020-10-06 at 16 54 37 Screenshot 2020-10-06 at 16 54 49

Desktop (please complete the following information):

Log Please activate Advanced Logging in the settings, restart the app and perform the steps to reproduce the bug. After the bug occurred, please open the iGlance window and in the app menu at the top left of the menu bar click on Diagnostics > Save Logfile.... Save the logfile somewhere and upload it here by dragging the file into the textfield.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

D0miH commented 4 years ago

Oh this is new. I found this Stackoverflow question regarding the exact same problem. It seems that the menu bar icons are not affected by the OS theme but rather by the desktop background. It seems if the images are drawn as "Template" images this issue can be fixed and the responsibility whether to draw the icons dark or light is passed to the system.

D0miH commented 4 years ago

Apparently you are using macOS Big Sur on your machine. Can you confirm #225 on your machine?

edwardbattistini commented 4 years ago

Oh this is new. I found this Stackoverflow question regarding the exact same problem. It seems that the menu bar icons are not affected by the OS theme but rather by the desktop background. It seems if the images are drawn as "Template" images this issue can be fixed and the responsibility whether to draw the icons dark or light is passed to the system.

This might help https://developer.apple.com/documentation/appkit/nsimage/1520017-template It might just be a boolean and you just need to use the black images

EDIT: The only problem remaining if this works is for non image data not sure how it can sync with background contrast

wahlmat commented 4 years ago

Got a similar issue, but I'm on High Sierra 10.13.6. I'll attach the screenshots below, I'm using the "Dark menu bar" option in the settings, as is seen. MacBook Pro 15", 2015 version, if that makes any difference.

Screen Shot 2020-10-10 at 20 57 09 Screen Shot 2020-10-10 at 18 18 34 Screen Shot 2020-10-10 at 18 18 12
D0miH commented 4 years ago

Thanks for reporting @wahlmat. This seems to be indeed related to the same issue that the menu bar has a different appearance than the selected os theme (which is light in your case). I need to research a bit to get an idea how we could fix this.

D0miH commented 3 years ago

It seems that https://stackoverflow.com/a/64525038 might contain a solution. The theme change callback is invoked but without changing the actual theme. Maybe by checking whether the theme changed after calling the callback is a possible way of detecting the font color in the menu bar.