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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user