amwx / FluentAvalonia

Control library focused on fluent design and bringing more WinUI controls into Avalonia
MIT License
1.05k stars 97 forks source link

AppWindow Icon renders at low quality #614

Open PremekTill opened 1 month ago

PremekTill commented 1 month ago

Describe the bug The Fluent Avalonia AppWindow Icon (top left on OS Windows) renders at low quality, which results in a significantly worse image quality compared to the base Avalonia Window Icon.

After some testing, this seems to be caused by bitmap interpolation quality settings – setting RenderOptions.BitmapInterpolationMode="HighQuality" on the AppWindow brings the rendering quality to the same level as in base Avalonia. As such, to fix this issue, it might be enough to set the BitmapInterpolationMode on the Icon directly. (The issue may have been caused by a change in the defaults for this setting between Avalonia 0.10 and 11.0 in the first place.)

Screenshots window_icon_comparison Left to right: FluentAvalonia AppWindow Icon (current), Avalonia Window Icon, FluentAvalonia AppWindow Icon (set to HighQuality).

Desktop/Platform (please complete the following information):

Additional context This issue seems very similar to #600, but I'm not sure if the cause could be the same (there seems to be no way to set BitmapInterpolation mode globally and I do not know whether Taskbar Icon is affected by this setting at all). There were also some other changes specific to Taskbar Icon rendering in downstream Avalonia (https://github.com/AvaloniaUI/Avalonia/pull/14564) which, if they do not carry over to AppWindow, could cause the difference found in #600 independently of this issue.