diff --git a/src/sgui/main.py b/src/sgui/main.py index af9c4fed..76cab2ee 100644 --- a/src/sgui/main.py +++ b/src/sgui/main.py @@ -1422,10 +1422,6 @@ def main( kill_engine(pid) RESPAWN = False - if theme.ICON_PATH: - LOG.info(f"Setting icon to '{theme.ICON_PATH}'") - shared.APP.setWindowIcon(QIcon(theme.ICON_PATH)) - global_check_device() MAIN_WINDOW.setup(scaler) shared.APP.lastWindowClosed.connect(shared.APP.quit) diff --git a/src/sgui/util.py b/src/sgui/util.py index 2f273d04..35e166f7 100644 --- a/src/sgui/util.py +++ b/src/sgui/util.py @@ -254,6 +254,11 @@ def setup_theme(app): theme.load_theme(scaler, font_size, font_unit) glbl_shared.APP.setStyle(QStyleFactory.create("Fusion")) glbl_shared.APP.setStyleSheet(theme.QSS) + if theme.ICON_PATH: + LOG.info(f"Setting icon to '{theme.ICON_PATH}'") + glbl_shared.APP.setWindowIcon( + QIcon(theme.ICON_PATH), + ) return scaler except Exception as ex: LOG.exception(ex)