-
-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to replace the icon in the top left corner? #1411
Comments
pywebview extracts and displays application icon from the executable. In other words you specify the application icon via a bundler. |
Webview. start (gui='qt '), when the gui is configured as qt, the correct icon cannot be displayed. If it is cef or other parameters, it is normal |
@Cqy11223344 Do you get this behaviour when application is frozen? The icon support comes only with frozen apps. |
This is my solution. Firstly, this library uses native window handles in the Windows system, so you need to consult the. NET documentation to find the loading method for window icons. Fortunately, there is just a method to load ICO files based on the path. At this point, you need to make slight changes to the source code by adding the path attribute of the ICO file to the custom window object, and adding code to specify the window icon when creating the window Create a webview and set 'icon_path'.
Now the icon has changed. |
I tried to modify it using the above method, but it still doesn't work. You can try calling it using the following method.
I tried to modify it using the above method, but it still doesn't work. You can try calling it using the following method. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The message to post on the issue when closing it. If none provided, will not comment when closing an issue. |
I have added As for other platforms (Window, macOS, Android) icon must be specified when freezing. |
Specification
Description
How to replace the icon in the top left corner?
Practicalities
The text was updated successfully, but these errors were encountered: