Skip to content

Commit

Permalink
Fix welcome screen window icon on some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
stargateaudio committed Nov 12, 2021
1 parent 9cbccab commit c49cc2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/sgui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/sgui/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c49cc2e

Please sign in to comment.