Browse Source

Platform event to toggle drawn decorations state (#21388)

pull/21394/head
Nikita Tsukanov 2 days ago
committed by GitHub
parent
commit
7dba3c80cc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      src/Avalonia.Controls/Platform/IWindowImpl.cs
  2. 1
      src/Avalonia.Controls/Window.cs

12
src/Avalonia.Controls/Platform/IWindowImpl.cs

@ -111,6 +111,18 @@ namespace Avalonia.Platform
/// </summary>
PlatformRequestedDrawnDecoration RequestedDrawnDecorations { get; }
/// <summary>
/// Triggered when decorations request from platform got changed
/// </summary>
Action? DrawnDecorationsRequestChanged
{
get => null;
set
{
}
}
/// <summary>
/// Gets a thickness that describes the amount each side of the non-client area extends into the client area.
/// It includes the titlebar.

1
src/Avalonia.Controls/Window.cs

@ -255,6 +255,7 @@ namespace Avalonia.Controls
impl.Closing = HandleClosing;
impl.GotInputWhenDisabled = OnGotInputWhenDisabled;
impl.WindowStateChanged = HandleWindowStateChanged;
impl.DrawnDecorationsRequestChanged = UpdateDrawnDecorations;
_maxPlatformClientSize = PlatformImpl?.MaxAutoSizeHint ?? default(Size);
impl.ExtendClientAreaToDecorationsChanged = ExtendClientAreaToDecorationsChanged;
impl.AllowedWindowActionsChanged = OnAllowedWindowActionsChanged;

Loading…
Cancel
Save