diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index e7a19d6a4..00e62ad77 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -30,6 +30,10 @@ namespace Flow.Launcher.Core.Resource public bool BlurEnabled { get; set; } + // due to blur only enabled when main window is loaded for the first time, this is used to track the blur status + // when the window is first loaded and prompt user that a restart is required for blur to take effect. + public bool BlurEnabledOnloaded { get; set; } + public Theme() { _themeDirectories.Add(DirectoryPath); diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 573403823..f04677669 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -39,6 +39,8 @@ Query Search Precision Should Use Pinyin Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for transliterating Chinese + Shadow effect is not allowed while current theme has blur effect enabled + Current theme has blur effect enabled for the first time, a restart is required in order to take effect Plugin diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 177953912..f712f9a6e 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -64,6 +64,8 @@ namespace Flow.Launcher // currently blur can only be called when loading main window. // is there a way to set blur only once? ThemeManager.Instance.SetBlurForWindow(); + ThemeManager.Instance.BlurEnabledOnloaded = ThemeManager.Instance.BlurEnabled; + WindowsInteropHelper.DisableControlBox(this); InitProgressbarAnimation(); InitializePosition(); diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index b476599b5..c3c35f256 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -275,6 +275,11 @@ namespace Flow.Launcher.ViewModel if (ThemeManager.Instance.BlurEnabled && Settings.UseDropShadowEffect) DropShadowEffect = false; + if (!ThemeManager.Instance.BlurEnabledOnloaded && ThemeManager.Instance.BlurEnabled) + { + MessageBox.Show(InternationalizationManager.Instance.GetTranslation("blurEffectRequireRestart")); + ThemeManager.Instance.BlurEnabledOnloaded = true; + } } } @@ -288,7 +293,7 @@ namespace Flow.Launcher.ViewModel { if (ThemeManager.Instance.BlurEnabled && value) { - MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pleaseSelectAnItem")); + MessageBox.Show(InternationalizationManager.Instance.GetTranslation("shadowEffectNotAllowed")); return; }