Added App Icon

This commit is contained in:
2026-08-28 17:40:43 +02:00
parent 73c20a0ff2
commit 7c85397af0
16 changed files with 178 additions and 2 deletions
+8 -1
View File
@@ -585,6 +585,12 @@ def start_local_server(directory: Path) -> int:
def main():
if os.name == "nt":
# Keep the running window separate from generic Python taskbar groups.
import ctypes
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("SUBControl.Desktop")
from desktop_shortcut import ensure_desktop_shortcut
ensure_desktop_shortcut()
api = ControlApi()
api._migrate_legacy_model()
project_root = Path(__file__).resolve().parent
@@ -602,7 +608,8 @@ def main():
window.events.maximized += lambda: setattr(api, "maximized", True)
window.events.restored += lambda: setattr(api, "maximized", False)
try:
webview.start(debug=True)
icon_path = project_root / "assets" / "sub-control.ico"
webview.start(debug=True, icon=str(icon_path) if icon_path.is_file() else None)
finally:
api.close()