diff --git a/resources/icons/app.ico b/resources/icons/app.ico new file mode 100644 index 0000000..1768c67 Binary files /dev/null and b/resources/icons/app.ico differ diff --git a/resources/icons/app.png b/resources/icons/app.png new file mode 100644 index 0000000..ca52173 Binary files /dev/null and b/resources/icons/app.png differ diff --git a/src/webdrop_bridge/ui/main_window.py b/src/webdrop_bridge/ui/main_window.py index 4099a2c..b4ac0b0 100644 --- a/src/webdrop_bridge/ui/main_window.py +++ b/src/webdrop_bridge/ui/main_window.py @@ -278,6 +278,14 @@ class MainWindow(QMainWindow): config.window_width, config.window_height, ) + + # Set window icon + icon_path = Path(__file__).parent.parent.parent.parent / "resources" / "icons" / "app.ico" + if icon_path.exists(): + self.setWindowIcon(QIcon(str(icon_path))) + logger.debug(f"Window icon set from {icon_path}") + else: + logger.warning(f"Window icon not found at {icon_path}") # Create web engine view self.web_view = RestrictedWebEngineView(config.allowed_urls) @@ -1147,7 +1155,7 @@ class MainWindow(QMainWindow): logger.debug("WebEnginePage scheduled for deletion") # Clear the page from the view - self.web_view.setPage(None) + self.web_view.setPage(None) # type: ignore event.accept()