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:
seird
2023-05-21 11:41:01 +02:00
committed by GitHub
parent 34d81ef6d0
commit bc221d6c8f
17 changed files with 105 additions and 272 deletions

View File

@@ -20,11 +20,13 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
def __init__(
self,
app: QtWidgets.QApplication,
parent: QtWidgets.QWidget,
message_item: MessagesModelItem,
image_path: str = "",
):
super(MessageWidget, self).__init__()
self.app = app
self.parent = parent
self.setupUi(self)
self.setAutoFillBackground(True)
@@ -104,7 +106,7 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
self.label_message.setFont(font_content)
def set_icons(self):
self.pb_delete.setIcon(QtGui.QIcon(get_theme_file("trashcan.svg")))
self.pb_delete.setIcon(QtGui.QIcon(get_theme_file(self.app, "trashcan.svg")))
self.pb_delete.setIconSize(QtCore.QSize(24, 24))
def set_message_image(self, filename: str):