Skip to content

Commit

Permalink
Separate icon use dependent on system theme (#9)
Browse files Browse the repository at this point in the history
(MacOS exclusive)
  • Loading branch information
MCMi460 committed Apr 19, 2022
1 parent 755b52b commit d6ab9f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ def switch(self):
MainWindow = QMainWindow()
window = GUI(MainWindow)

tray = SystemTrayApp(QIcon(getPath('icon.png')), MainWindow)
iconFile = 'taskbarDark.png'
if sys.platform.startswith('darwin'):
import subprocess
if not bool(subprocess.Popen('defaults read -g AppleInterfaceStyle', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell = True).communicate()[0]):
iconFile = 'taskbarLight.png'
tray = SystemTrayApp(QIcon(getPath(iconFile)), MainWindow)
window.setupUi(MainWindow)
window.selfService()

Expand Down
Binary file added client/taskbarDark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/taskbarLight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d6ab9f9

Please sign in to comment.