Add Windows system chrome patchers (Harmony)

Introduce support for toggling the system chrome on Windows using Harmony patchers. Adds Lib.Harmony.Thin to package props and project, new patcher infrastructure (ChromePatchState, PatcherEntrance) and two Harmony patches that disable FluentAvalonia's Windows chrome when configured. Program.cs now loads the chrome setting and installs patchers conditionally on Windows/x86-x64. Settings viewmodel and view updated: expose IsWindowsOs, require restart on appearance changes, migrate SettingsWindow to FAAppWindow and adapt titlebar/layout (include Windows caption placeholder and footer menu items). Also add a .gitkeep and a build log file.
This commit is contained in:
lincube
2026-05-04 02:31:25 +08:00
parent 458494d131
commit 3a8516334a
12 changed files with 266 additions and 112 deletions

View File

@@ -31,12 +31,14 @@ public sealed partial class SettingsWindowViewModel : ViewModelBase
{
_localizationService = new();
_languageCode = "zh-CN";
IsWindowsOs = OperatingSystem.IsWindows();
}
public SettingsWindowViewModel(LocalizationService localizationService, string languageCode)
{
_localizationService = localizationService;
_languageCode = languageCode;
IsWindowsOs = OperatingSystem.IsWindows();
}
private string L(string key) => _localizationService.GetString(_languageCode, key, key);
@@ -86,6 +88,10 @@ public sealed partial class SettingsWindowViewModel : ViewModelBase
[ObservableProperty]
private bool _isDrawerOpen;
/// <summary>用于标题栏右侧系统按钮占位(与 SecRandom / ClassIsland 一致,仅 Windows 显示)。</summary>
[ObservableProperty]
private bool _isWindowsOs;
public SettingsWindowViewModel Initialize()
{
RefreshLanguage(_languageCode);
@@ -855,7 +861,7 @@ public sealed partial class AppearanceSettingsPageViewModel : ViewModelBase
return;
}
PersistCurrentState(restartRequired: false);
PersistCurrentState(restartRequired: true);
}
partial void OnSelectedCornerRadiusStyleChanged(SelectionOption? value)