mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-23 23:01:26 -04:00
Add a grayscale OnionShare logo for the systray icon in macOS
This commit is contained in:
parent
552c9eeb50
commit
c0daea953f
2 changed files with 7 additions and 1 deletions
|
@ -147,12 +147,18 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
self.check_for_updates()
|
||||
|
||||
def _initSystemTray(self):
|
||||
system = common.get_platform()
|
||||
|
||||
menu = QtWidgets.QMenu()
|
||||
exitAction = menu.addAction(strings._('systray_menu_exit', True))
|
||||
exitAction.triggered.connect(self.close)
|
||||
|
||||
self.systemTray = QtWidgets.QSystemTrayIcon(self)
|
||||
self.systemTray.setIcon(QtGui.QIcon(common.get_resource_path('images/logo.png')))
|
||||
# The convention is Mac systray icons are always grayscale
|
||||
if system == 'Darwin':
|
||||
self.systemTray.setIcon(QtGui.QIcon(common.get_resource_path('images/logo_grayscale.png')))
|
||||
else:
|
||||
self.systemTray.setIcon(QtGui.QIcon(common.get_resource_path('images/logo.png')))
|
||||
self.systemTray.setContextMenu(menu)
|
||||
self.systemTray.show()
|
||||
|
||||
|
|
BIN
share/images/logo_grayscale.png
Normal file
BIN
share/images/logo_grayscale.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Add table
Add a link
Reference in a new issue