Automatic theme (#29)
* add "automatic" theme set the theme and icons based on the system theme * update the default icons based on system theme * update pyqt to 6.5.0 to get the colorSchemeChanged callback * rename style to theme * remove unused svg files for default theme * ServerInfoDialog: update feedback colors in dark mode
This commit is contained in:
@@ -8,8 +8,9 @@ settings = Settings("gotify-tray")
|
||||
|
||||
|
||||
class StatusWidget(QtWidgets.QLabel):
|
||||
def __init__(self):
|
||||
def __init__(self, app: QtWidgets.QApplication):
|
||||
super(StatusWidget, self).__init__()
|
||||
self.app = app
|
||||
self.setFixedSize(QtCore.QSize(20, 20))
|
||||
self.setScaledContents(True)
|
||||
self.set_connecting()
|
||||
@@ -17,7 +18,7 @@ class StatusWidget(QtWidgets.QLabel):
|
||||
|
||||
def set_status(self, image: str):
|
||||
self.image = image
|
||||
self.setPixmap(QtGui.QPixmap(get_theme_file(image)))
|
||||
self.setPixmap(QtGui.QPixmap(get_theme_file(self.app, image)))
|
||||
|
||||
def set_active(self):
|
||||
self.setToolTip("Listening for new messages")
|
||||
|
||||
Reference in New Issue
Block a user