|
|
@ -285,6 +285,11 @@ namespace Avalonia.Controls |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public event EventHandler? Closed; |
|
|
public event EventHandler? Closed; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets a method called when the TopLevel's scaling changes.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public event EventHandler? ScalingChanged; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the client size of the window.
|
|
|
/// Gets or sets the client size of the window.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
@ -428,7 +433,7 @@ namespace Avalonia.Controls |
|
|
double ILayoutRoot.LayoutScaling => PlatformImpl?.RenderScaling ?? 1; |
|
|
double ILayoutRoot.LayoutScaling => PlatformImpl?.RenderScaling ?? 1; |
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
/// <inheritdoc/>
|
|
|
double IRenderRoot.RenderScaling => PlatformImpl?.RenderScaling ?? 1; |
|
|
public double RenderScaling => PlatformImpl?.RenderScaling ?? 1; |
|
|
|
|
|
|
|
|
IStyleHost IStyleHost.StylingParent => _globalStyles!; |
|
|
IStyleHost IStyleHost.StylingParent => _globalStyles!; |
|
|
|
|
|
|
|
|
@ -590,6 +595,7 @@ namespace Avalonia.Controls |
|
|
protected virtual void HandleScalingChanged(double scaling) |
|
|
protected virtual void HandleScalingChanged(double scaling) |
|
|
{ |
|
|
{ |
|
|
LayoutHelper.InvalidateSelfAndChildrenMeasure(this); |
|
|
LayoutHelper.InvalidateSelfAndChildrenMeasure(this); |
|
|
|
|
|
ScalingChanged?.Invoke(this, EventArgs.Empty); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static bool TransparencyLevelsMatch (WindowTransparencyLevel requested, WindowTransparencyLevel received) |
|
|
private static bool TransparencyLevelsMatch (WindowTransparencyLevel requested, WindowTransparencyLevel received) |
|
|
|