1

i'm creating wxPython for macOS and i add icon for menubar. as macOS have dark mode existed, i want icon at menubar adaptive

when menubar is light color, then icon of app will black if menubar is dark color/in dark mode, then icon of will be white

icon when menu in light mode

icon when menu in dark mode

as you can see, icon of my app not become white when menubar in dark mode but it's grey (i set color of my app to grey)

how can i make my icon be adaptive (black when menubar in light mode, white when menubar in dark mode)?

is there feature in wxPython to make like it?

or do i need use spesific image format for icon?

reza rifqi
  • 21
  • 3
  • You are going to need 2 icons. One black and one white. Load the appropriate icon depending on the environment, light or dark. – Rolf of Saxony Jun 14 '17 at 14:58
  • how i detect if macOS using dark mode/light mode from python? – reza rifqi Jun 15 '17 at 02:00
  • Ha, there's the rub! I do not own a Mac and never have. Perhaps these two SO posts will help https://stackoverflow.com/questions/37108924/python-code-to-detect-dark-mode-in-os-x-ei-capitan-to-change-the-status-bar-menu#37343691 and this one for the context of putting the code together https://stackoverflow.com/questions/1933107/how-do-you-listen-to-notifications-from-itunes-on-a-mac-using-the-nsdistributed – Rolf of Saxony Jun 15 '17 at 08:02

0 Answers0