Skip to content

Commit

Permalink
Let trayicon owning program handle coloring it with filters
Browse files Browse the repository at this point in the history
  • Loading branch information
xylix committed Apr 5, 2020
1 parent 91f250b commit 5385d8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion aw_qt/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<qresource>
<file alias="logo.png">../media/logo/logo.png</file>
<file alias="black-monochrome-logo.png">../media/logo/black-monochrome-logo.png</file>
<file alias="white-monochrome-logo.png">../media/logo/white-monochrome-logo.png</file>
</qresource>
</RCC>
9 changes: 3 additions & 6 deletions aw_qt/trayicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,9 @@ def run(manager, testing=False):

widget = QWidget()
if sys.platform == "darwin":
from Foundation import NSUserDefaults
style = NSUserDefaults.standardUserDefaults().stringForKey_('AppleInterfaceStyle')
if style == "Dark":
icon = QIcon(":/white-monochrome-logo.png")
else:
icon = QIcon(":/black-monochrome-logo.png")
icon = QIcon(":/black-monochrome-logo.png")
# Allow macOS to use filters for changing the icon's color
icon.setIsMask(True)
else:
icon = QIcon(":/logo.png")

Expand Down
2 changes: 1 addition & 1 deletion media

0 comments on commit 5385d8b

Please sign in to comment.