Skip to content
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

Fix for Win32Platform ArgumentException when creating WindowIcon from Bitmap #14550

Closed
wants to merge 2 commits into from
Closed

Fix for Win32Platform ArgumentException when creating WindowIcon from Bitmap #14550

wants to merge 2 commits into from

Conversation

mihnea-radulescu
Copy link
Contributor

What does the pull request do?

The PR fixes the issue #14541, by extending the Win32Platform correction already provided in this PR.

The other relevant implementations of IPlatformIconLoader in Avalonia.X11.X11IconLoader and Avalonia.Native.IconLoader implement the logic correctly, thus are not affected by the issue.

What is the current behavior?

The Win32Platform implementation of IWindowIconImpl LoadIcon(IBitmapImpl bitmap) throws an ArgumentException.

What is the updated/expected behavior with this PR?

The Win32Platform implementation of IWindowIconImpl LoadIcon(IBitmapImpl bitmap) does not throw an ArgumentException anymore.

How was the solution implemented?

The fix calls the method IconImpl CreateIconImpl(Stream stream), just like the other two LoadIcon() methods in the class Win32Platform.

Fixed issues

Fixes #14541

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044667-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
Copy link
Member

maxkatz6 commented Feb 9, 2024

Thank you for investigating this issue!
As we found out, this issue was already fixed on master branch in #13445 PR, but by mistake it wasn't including in backporting process from 11.1 to 11.0. Resulting in only first PR being merged with a bug.

I am going to close this PR, as old fix from #13445 PR is going to be backported now.

@maxkatz6 maxkatz6 closed this Feb 9, 2024
@mihnea-radulescu mihnea-radulescu deleted the bugfix/issue-14541 branch February 9, 2024 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArgumentException when creating WindowIcon from Bitmap
3 participants