Follow the system theme and set the icons accordingly, no more handcrafted theming
This commit is contained in:
@@ -13,7 +13,6 @@ from gotify_tray.tasks import (
|
||||
CacheSizeTask,
|
||||
ClearCacheTask,
|
||||
)
|
||||
from gotify_tray.gui.themes import get_themes
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from ..designs.widget_settings import Ui_Dialog
|
||||
@@ -25,7 +24,6 @@ settings = Settings("gotify-tray")
|
||||
|
||||
class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
quit_requested = QtCore.pyqtSignal()
|
||||
theme_change_requested = QtCore.pyqtSignal(str)
|
||||
|
||||
def __init__(self):
|
||||
super(SettingsDialog, self).__init__()
|
||||
@@ -60,8 +58,6 @@ class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.cb_tray_icon_unread.setChecked(settings.value("tray/icon/unread", type=bool))
|
||||
|
||||
# Interface
|
||||
self.combo_theme.addItems(get_themes())
|
||||
self.combo_theme.setCurrentText(settings.value("theme", type=str))
|
||||
self.cb_priority_colors.setChecked(settings.value("MessageWidget/priority_color", type=bool))
|
||||
self.cb_locale.setChecked(settings.value("locale", type=bool))
|
||||
|
||||
@@ -193,7 +189,6 @@ class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.cb_tray_icon_unread.stateChanged.connect(self.settings_changed_callback)
|
||||
|
||||
# Interface
|
||||
self.combo_theme.currentTextChanged.connect(self.settings_changed_callback)
|
||||
self.cb_priority_colors.stateChanged.connect(self.settings_changed_callback)
|
||||
self.cb_locale.stateChanged.connect(self.settings_changed_callback)
|
||||
|
||||
@@ -230,12 +225,6 @@ class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
settings.setValue("tray/icon/unread", self.cb_tray_icon_unread.isChecked())
|
||||
|
||||
# Interface
|
||||
current_theme = settings.value("theme", type=str)
|
||||
selected_theme = self.combo_theme.currentText()
|
||||
if current_theme != selected_theme:
|
||||
settings.setValue("theme", selected_theme)
|
||||
self.theme_change_requested.emit(selected_theme)
|
||||
|
||||
settings.setValue("MessageWidget/priority_color", self.cb_priority_colors.isChecked())
|
||||
settings.setValue("locale", self.cb_locale.isChecked())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user