iGlance icon indicating copy to clipboard operation
iGlance copied to clipboard

Menu bar icon issue?

Open edwardbattistini opened this issue 4 years ago • 7 comments

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

  • Launch the app
  • make sure system icons are displayed
  • Switch between Light and dark mode on MacOS

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):

  • MacOS Version: [e.g. 10.12]
  • Version of the app: [e.g. 2.0.3]

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.

edwardbattistini avatar Oct 06 '20 15:10 edwardbattistini

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.

issue-label-bot[bot] avatar Oct 06 '20 15:10 issue-label-bot[bot]

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 avatar Oct 06 '20 16:10 D0miH

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

D0miH avatar Oct 06 '20 16:10 D0miH

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

edwardbattistini avatar Oct 07 '20 16:10 edwardbattistini

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

wahlmat avatar Oct 12 '20 14:10 wahlmat

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 avatar Oct 12 '20 16:10 D0miH

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.

D0miH avatar Dec 17 '20 09:12 D0miH