-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
On Windows, a window's ICON_SMALL
is not set
#11569
Comments
@tomenscape great finding. Do you think you're able to provide a PR to fix it? |
I started making a branch but I have discovered that things are far more broken than I thought.
This currently happens in
(I'm not sure how to update tray icons when DPI changes. That would require Avalonia to know which screen they are being displayed on...and can't they be displayed on multiple?) Setting both the big and small icons to the same image does improve the scaling quality, as shown above, but remains incorrect behaviour. Since community contributions are frozen and this change is much bigger than I anticipated, I won't open a PR right now. More reading: https://blog.barthe.ph/2009/07/17/wmseticon/ |
|
@tomenscape fyi win 7 will not be supported officially anymore. We are glad if it works, but there is no guarantee and no testing on this anymore. |
When Avalonia sets a window icon on Win32, it only sets the "big" icon. If the image being set is an ICO file, this results in the OS selecting a large (>=48px) image from within and downsizing it, with low-quality results.
The existing call that Avalonia makes should be duplicated, with the
wParam
changed toIcons.ICON_SMALL
. This prompts the OS to select an appropriate image from the same ICO file.A comparison gif:
To Reproduce
Steps to reproduce the behavior:
You will see the large icon used where the small icon would be expected.
Expected behavior
Windows selects the appropriate small icon from a .ico file.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: