mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 16:29:31 -05:00
Add a grayscale OnionShare logo for the systray icon in macOS
This commit is contained in:
parent
65894e2e44
commit
63e491bddf
@ -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…
Reference in New Issue
Block a user