1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-05 00:12:49 +01:00

fix: fix color palette if qtheme was not called

This commit is contained in:
2024-08-23 20:14:50 +02:00
parent 44cfda1c07
commit 3f3b207295

View File

@@ -12,7 +12,10 @@ from qtpy.QtWidgets import QApplication
def get_theme_palette():
theme = QApplication.instance().theme["theme"]
if QApplication.instance() is None or not hasattr(QApplication.instance(), "theme"):
theme = "dark"
else:
theme = QApplication.instance().theme["theme"]
return bec_qthemes.load_palette(theme)