✨ Windows taskbar icon workaround.

This commit is contained in:
Robert Honz
2024-01-19 11:16:33 +01:00
parent d39bcc9292
commit 1e4d89aac8
+11
View File
@@ -484,6 +484,17 @@ def gui_activate(tidal: Tidal | None = None):
icon: QtGui.QIcon = QtGui.QIcon(pixmap)
app.setWindowIcon(icon)
# This bit gets the taskbar icon working properly in Windows
if sys.platform.startswith("win"):
import ctypes
# Make sure Pyinstaller icons are still grouped
if not sys.argv[0].endswith(".exe"):
# Arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
"CompanyName.ProductName.SubProduct.VersionInformation"
)
window = MainWindow(tidal=tidal)
window.show()