diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 00e62ad77..488e73eb6 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -30,10 +30,6 @@ 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); @@ -98,6 +94,8 @@ namespace Flow.Launcher.Core.Resource if (Settings.UseDropShadowEffect && !BlurEnabled) AddDropShadowEffectToCurrentTheme(); + + SetBlurForWindow(); } catch (DirectoryNotFoundException e) { @@ -356,6 +354,8 @@ namespace Flow.Launcher.Core.Resource private void SetWindowAccent(Window w, AccentState state) { var windowHelper = new WindowInteropHelper(w); + w.Width = 750; + windowHelper.EnsureHandle(); var accent = new AccentPolicy { AccentState = state }; var accentStructSize = Marshal.SizeOf(accent); diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index f04677669..efb82b478 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -40,7 +40,6 @@ 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 f712f9a6e..735103938 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -61,11 +61,6 @@ namespace Flow.Launcher // show notify icon when flowlauncher is hidden InitializeNotifyIcon(); - // 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 c3c35f256..53789d2d9 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -274,12 +274,6 @@ 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; - } } }