mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Fix global settings action button icon and improve theme handling in GUI
This commit is contained in:
@@ -12,6 +12,7 @@ from core.downloading.download import add_magnet
|
||||
|
||||
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||
def __init__(self):
|
||||
global settings_action
|
||||
super().__init__()
|
||||
searchresults = []
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from core.gui import run_gui as gui
|
||||
from core.gui import MainWindow
|
||||
from PySide6.QtGui import QIcon, QAction
|
||||
from PySide6 import QtWidgets
|
||||
import qdarktheme
|
||||
import darkdetect
|
||||
import sys
|
||||
|
||||
|
||||
@@ -9,6 +12,10 @@ import sys
|
||||
|
||||
def run_gui():
|
||||
app = QtWidgets.QApplication([])
|
||||
if darkdetect.isDark:
|
||||
app.setStyleSheet(qdarktheme.load_stylesheet("dark"))
|
||||
else:
|
||||
app.setStyleSheet(qdarktheme.load_stylesheet("light"))
|
||||
widget = MainWindow()
|
||||
widget.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
Reference in New Issue
Block a user