This commit is contained in:
qhy040404
2024-03-08 16:30:00 +08:00
parent 1c847626c7
commit ea867916f2

View File

@@ -69,13 +69,16 @@ internal sealed class WindowController
window.Activate();
options.BringToForeground();
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
UpdateElementTheme(appOptions.ElementTheme);
if (options.UseSystemBackdrop)
{
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
UpdateSystemBackdrop(appOptions.BackdropType);
appOptions.PropertyChanged += OnOptionsPropertyChanged;
}
appOptions.PropertyChanged += OnOptionsPropertyChanged;
subclass.Initialize();
window.Closed += OnWindowClosed;
@@ -164,6 +167,11 @@ internal sealed class WindowController
private bool UpdateSystemBackdrop(BackdropType backdropType)
{
if (!options.UseSystemBackdrop)
{
return false;
}
window.SystemBackdrop = backdropType switch
{
BackdropType.Transparent => new Backdrop.TransparentBackdrop(),