Add application icon in PNG format to resources/icons directory
This commit is contained in:
parent
a4d735d759
commit
de98623ee0
3 changed files with 9 additions and 1 deletions
BIN
resources/icons/app.ico
Normal file
BIN
resources/icons/app.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
BIN
resources/icons/app.png
Normal file
BIN
resources/icons/app.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -278,6 +278,14 @@ class MainWindow(QMainWindow):
|
||||||
config.window_width,
|
config.window_width,
|
||||||
config.window_height,
|
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
|
# Create web engine view
|
||||||
self.web_view = RestrictedWebEngineView(config.allowed_urls)
|
self.web_view = RestrictedWebEngineView(config.allowed_urls)
|
||||||
|
|
@ -1147,7 +1155,7 @@ class MainWindow(QMainWindow):
|
||||||
logger.debug("WebEnginePage scheduled for deletion")
|
logger.debug("WebEnginePage scheduled for deletion")
|
||||||
|
|
||||||
# Clear the page from the view
|
# Clear the page from the view
|
||||||
self.web_view.setPage(None)
|
self.web_view.setPage(None) # type: ignore
|
||||||
|
|
||||||
event.accept()
|
event.accept()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue