mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use public current theme
This commit is contained in:
parent
b2dc128699
commit
59fbef1d78
2 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<Theme>();
|
||||
_settings = Ioc.Default.GetRequiredService<Settings>();
|
||||
context.API.VisibilityChanged += OnVisibilityChanged;
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +66,7 @@ namespace Flow.Launcher.Plugin.Sys
|
|||
private Result CreateThemeResult(string theme, int score, IList<int> highlightData)
|
||||
{
|
||||
string title;
|
||||
if (theme == _settings.Theme)
|
||||
if (theme == _theme.CurrentTheme)
|
||||
{
|
||||
title = $"{theme} ★";
|
||||
score = 2000;
|
||||
|
|
|
|||
Loading…
Reference in a new issue