diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 9d490ef81..489002617 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -124,13 +124,15 @@ namespace Flow.Launcher.Core.Resource { try { - // Loads a ResourceDictionary for the specified theme. + // Load a ResourceDictionary for the specified theme. var themeName = GetCurrentTheme(); var dict = GetThemeResourceDictionary(themeName); - // Applies font settings to the theme resource. + // Apply font settings to the theme resource. ApplyFontSettings(dict); UpdateResourceDictionary(dict); + + // Must apply blur and drop shadow effects _ = RefreshFrameAsync(); } catch (Exception e) @@ -405,7 +407,7 @@ namespace Flow.Launcher.Core.Resource try { if (string.IsNullOrEmpty(path)) - throw new DirectoryNotFoundException("Theme path can't be found <{path}>"); + throw new DirectoryNotFoundException($"Theme path can't be found <{path}>"); // Retrieve theme resource – always use the resource with font settings applied. var resourceDict = GetResourceDictionary(theme); @@ -422,9 +424,9 @@ namespace Flow.Launcher.Core.Resource BlurEnabled = IsBlurTheme(); - // Apply blur and drop shadow effects + // Can only apply blur but here also apply drop shadow effect to avoid possible drop shadow effect issues _ = RefreshFrameAsync(); - + return true; } catch (DirectoryNotFoundException) diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index 733996425..647a9bcfc 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -229,6 +229,8 @@ public partial class SettingsPaneThemeViewModel : BaseModel Settings.BackdropType = value; + // Can only apply blur because drop shadow effect is not supported with backdrop + // So drop shadow effect has been disabled _ = _theme.SetBlurForWindowAsync(); OnPropertyChanged(nameof(IsDropShadowEnabled));