mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 17:24:27 +08:00
0.7.6.1
修复了系统标题栏的问题。
This commit is contained in:
@@ -36,7 +36,8 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Window.Styles>
|
</Window.Styles>
|
||||||
|
|
||||||
<Grid Classes="settings-scope"
|
<Grid x:Name="RootGrid"
|
||||||
|
Classes="settings-scope"
|
||||||
Background="{DynamicResource AdaptiveSettingsWindowBackgroundBrush}"
|
Background="{DynamicResource AdaptiveSettingsWindowBackgroundBrush}"
|
||||||
RowDefinitions="Auto,*">
|
RowDefinitions="Auto,*">
|
||||||
<Border x:Name="WindowTitleBarHost"
|
<Border x:Name="WindowTitleBarHost"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
|
|||||||
private readonly IHostApplicationLifecycle _hostApplicationLifecycle;
|
private readonly IHostApplicationLifecycle _hostApplicationLifecycle;
|
||||||
private readonly IAppLogoService _appLogoService = HostAppLogoProvider.GetOrCreate();
|
private readonly IAppLogoService _appLogoService = HostAppLogoProvider.GetOrCreate();
|
||||||
private readonly Dictionary<string, Control> _cachedPages = new(StringComparer.OrdinalIgnoreCase);
|
private readonly Dictionary<string, Control> _cachedPages = new(StringComparer.OrdinalIgnoreCase);
|
||||||
private readonly bool _useSystemChrome;
|
private bool _useSystemChrome;
|
||||||
private bool _isResponsiveRefreshPending;
|
private bool _isResponsiveRefreshPending;
|
||||||
private bool _isRestartPromptVisible;
|
private bool _isRestartPromptVisible;
|
||||||
|
|
||||||
@@ -152,12 +152,19 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
|
|||||||
|
|
||||||
public void ApplyChromeMode(bool useSystemChrome)
|
public void ApplyChromeMode(bool useSystemChrome)
|
||||||
{
|
{
|
||||||
if (useSystemChrome || OperatingSystem.IsMacOS())
|
_useSystemChrome = useSystemChrome || OperatingSystem.IsMacOS();
|
||||||
|
|
||||||
|
if (_useSystemChrome)
|
||||||
{
|
{
|
||||||
ExtendClientAreaToDecorationsHint = true;
|
ExtendClientAreaToDecorationsHint = true;
|
||||||
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.PreferSystemChrome;
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.PreferSystemChrome;
|
||||||
ExtendClientAreaTitleBarHeightHint = -1;
|
ExtendClientAreaTitleBarHeightHint = -1;
|
||||||
SystemDecorations = SystemDecorations.Full;
|
SystemDecorations = SystemDecorations.Full;
|
||||||
|
|
||||||
|
if (WindowTitleBarHost is { })
|
||||||
|
{
|
||||||
|
WindowTitleBarHost.IsVisible = false;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,6 +172,11 @@ public partial class SettingsWindow : Window, ISettingsPageHostContext
|
|||||||
ExtendClientAreaToDecorationsHint = true;
|
ExtendClientAreaToDecorationsHint = true;
|
||||||
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
||||||
ExtendClientAreaTitleBarHeightHint = 48;
|
ExtendClientAreaTitleBarHeightHint = 48;
|
||||||
|
|
||||||
|
if (WindowTitleBarHost is { })
|
||||||
|
{
|
||||||
|
WindowTitleBarHost.IsVisible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefreshShellText()
|
public void RefreshShellText()
|
||||||
|
|||||||
Reference in New Issue
Block a user