Browse Source

Invoke ScalingChanged when scaling changed on iOS (#18767)

release/11.3.0
Maxwell Katz 9 months ago
committed by Julien Lebosquain
parent
commit
e94d54da96
  1. 5
      src/iOS/Avalonia.iOS/AvaloniaView.cs

5
src/iOS/Avalonia.iOS/AvaloniaView.cs

@ -375,6 +375,11 @@ namespace Avalonia.iOS
{
_topLevelImpl.Resized?.Invoke(_topLevelImpl.ClientSize, WindowResizeReason.Layout);
var scaling = (double)ContentScaleFactor;
if (_latestLayoutProps.scaling != scaling)
{
_topLevelImpl.ScalingChanged?.Invoke(scaling);
}
_latestLayoutProps = (new PixelSize((int)(Bounds.Width * scaling), (int)(Bounds.Height * scaling)), scaling);
if (_currentRenderTarget is not null)
{

Loading…
Cancel
Save