diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 4deea1f66..cda125a39 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -12,7 +12,6 @@ using System.Windows.Shell; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; -using CommunityToolkit.Mvvm.DependencyInjection; using Flow.Launcher.Plugin; namespace Flow.Launcher.Core.Resource @@ -35,6 +34,8 @@ namespace Flow.Launcher.Core.Resource private string DirectoryPath => Path.Combine(Constant.ProgramDirectory, Folder); private string UserDirectoryPath => Path.Combine(DataLocation.DataDirectory(), Folder); + public string CurrentTheme => _settings.Theme; + public bool BlurEnabled { get; set; } private double mainWindowWidth; diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs index 453959ac3..82c06c280 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.DependencyInjection; using Flow.Launcher.Core.Resource; -using Flow.Launcher.Infrastructure.UserSettings; namespace Flow.Launcher.Plugin.Sys { @@ -11,7 +10,6 @@ namespace Flow.Launcher.Plugin.Sys { public const string Keyword = "fltheme"; - private readonly Settings _settings; private readonly Theme _theme; private readonly PluginInitContext _context; @@ -21,7 +19,6 @@ namespace Flow.Launcher.Plugin.Sys { _context = context; _theme = Ioc.Default.GetRequiredService(); - _settings = Ioc.Default.GetRequiredService(); context.API.VisibilityChanged += OnVisibilityChanged; } @@ -69,7 +66,7 @@ namespace Flow.Launcher.Plugin.Sys private Result CreateThemeResult(string theme, int score, IList highlightData) { string title; - if (theme == _settings.Theme) + if (theme == _theme.CurrentTheme) { title = $"{theme} ★"; score = 2000;