change the tray icon to show there are unread notifications
This commit is contained in:
@@ -44,7 +44,18 @@ class Tray(QtWidgets.QSystemTrayIcon):
|
||||
self.setContextMenu(menu)
|
||||
|
||||
def set_icon_ok(self):
|
||||
self.icon_error = False
|
||||
self.setIcon(QtGui.QIcon(get_icon("tray")))
|
||||
|
||||
def set_icon_error(self):
|
||||
self.icon_error = True
|
||||
self.setIcon(QtGui.QIcon(get_icon("tray-error")))
|
||||
|
||||
def set_icon_unread(self):
|
||||
self.setIcon(QtGui.QIcon(get_icon("tray-unread")))
|
||||
|
||||
def revert_icon(self):
|
||||
if self.icon_error:
|
||||
self.set_icon_error()
|
||||
else:
|
||||
self.set_icon_ok()
|
||||
|
||||
Reference in New Issue
Block a user