From 84cd1a84ac00dd301eb638f9c2293906efe30076 Mon Sep 17 00:00:00 2001 From: Odotocodot <48138990+Odotocodot@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:05:50 +0000 Subject: [PATCH] Remove extra code --- .../Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 41 ++++--------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs index 24eff0017..38619cbbc 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs @@ -16,7 +16,7 @@ namespace Flow.Launcher.Plugin.Sys #region Theme Selection - // Theme select codes from SettingsPaneThemeViewModel.cs + // Theme select codes simplified from SettingsPaneThemeViewModel.cs private Theme.ThemeData _selectedTheme; private Theme.ThemeData SelectedTheme @@ -28,36 +28,15 @@ namespace Flow.Launcher.Plugin.Sys _theme.ChangeTheme(value.FileNameWithoutExtension); if (_theme.BlurEnabled && _settings.UseDropShadowEffect) - DropShadowEffect = false; + { + _theme.RemoveDropShadowEffectFromCurrentTheme(); + _settings.UseDropShadowEffect = false; + } } } private List Themes => _theme.LoadAvailableThemes(); - private bool DropShadowEffect - { - get => _settings.UseDropShadowEffect; - set - { - if (_theme.BlurEnabled && value) - { - _context.API.ShowMsgBox(_context.API.GetTranslation("shadowEffectNotAllowed")); - return; - } - - if (value) - { - _theme.AddDropShadowEffectToCurrentTheme(); - } - else - { - _theme.RemoveDropShadowEffectFromCurrentTheme(); - } - - _settings.UseDropShadowEffect = value; - } - } - #endregion public ThemeSelector(PluginInitContext context) @@ -107,14 +86,12 @@ namespace Flow.Launcher.Plugin.Sys if (theme.IsDark == true) { description += _context.API.GetTranslation("TypeIsDarkToolTip"); - if (theme.HasBlur == true) - { - description += ""; - description += _context.API.GetTranslation("TypeHasBlurToolTip"); - } } - else if (theme.HasBlur == true) + + if (theme.HasBlur == true) { + if (!string.IsNullOrEmpty(description)) + description += " "; description += _context.API.GetTranslation("TypeHasBlurToolTip"); }