diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs index 20d0dd5a4..3d548b6b1 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/SearchSource.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Windows.Media; using JetBrains.Annotations; using Newtonsoft.Json; @@ -16,11 +16,26 @@ namespace Flow.Launcher.Plugin.WebSearch public string Icon { get; set; } = DefaultIcon; /// - /// All icon should be put under Images directory + /// Default icons are placed in Images directory in the app location. + /// Custom icons are placed in the user data directory /// [NotNull] - [JsonIgnore] - internal string IconPath => Path.Combine(Main.ImagesDirectory, Icon); + public string IconPath + { + get + { + if (string.IsNullOrEmpty(iconPath)) + return Path.Combine(Main.ImagesDirectory, Icon); + + return iconPath; + } + set + { + iconPath = value; + } + } + + private string iconPath; [JsonIgnore] public ImageSource Image => ImageLoader.Load(IconPath);