mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
parent
ab1efb0749
commit
84673f26f3
1 changed files with 3 additions and 0 deletions
|
|
@ -22,10 +22,12 @@ namespace Wox.Core.Resource
|
|||
private const string Folder = "Themes";
|
||||
private const string Extension = ".xaml";
|
||||
private string DirectoryPath => Path.Combine(Constant.ProgramDirectory, Folder);
|
||||
private string UserDirectoryPath => Path.Combine(Constant.DataDirectory, Folder);
|
||||
|
||||
public Theme()
|
||||
{
|
||||
_themeDirectories.Add(DirectoryPath);
|
||||
_themeDirectories.Add(UserDirectoryPath);
|
||||
MakesureThemeDirectoriesExist();
|
||||
|
||||
var dicts = Application.Current.Resources.MergedDictionaries;
|
||||
|
|
@ -94,6 +96,7 @@ namespace Wox.Core.Resource
|
|||
if (_oldTheme != theme)
|
||||
{
|
||||
dicts.Remove(_oldResource);
|
||||
//fixme if something goes wrong here
|
||||
var newResource = GetResourceDictionary();
|
||||
dicts.Add(newResource);
|
||||
_oldResource = newResource;
|
||||
|
|
|
|||
Loading…
Reference in a new issue