window style

This commit is contained in:
rmbgame
2021-06-05 20:37:04 +08:00
parent c5899cb7ee
commit bdfc7e86ac
2 changed files with 9 additions and 7 deletions
@@ -13,7 +13,6 @@ namespace System.Application.UI.Views.Controls
if (DI.Platform == System.Platform.Apple)
{
var title = this.FindControl<StackPanel>("title");
title.HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center;
}
}
@@ -18,16 +18,19 @@ namespace Avalonia.Controls
public FluentWindow(bool isSaveStatus = true)
{
if (DI.Platform == System.Platform.Windows)
{
ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaTitleBarHeightHint = -1;
//if (DI.Platform == System.Platform.Windows)
//{
ExtendClientAreaToDecorationsHint = true;
//ExtendClientAreaTitleBarHeightHint = -1;
DI.Get<IDesktopPlatformService>().FixFluentWindowStyleOnWin7(PlatformImpl.Handle.Handle);
}
//}
//SystemDecorations = SystemDecorations.BorderOnly;
TransparencyLevelHint = WindowTransparencyLevel.AcrylicBlur;
if (DI.Platform == System.Platform.Windows)
{
DI.Get<IDesktopPlatformService>().FixFluentWindowStyleOnWin7(PlatformImpl.Handle.Handle);
}
this.GetObservable(WindowStateProperty)
.Subscribe(x =>