From 329b3bb9c8832ce15062f7ca34986095a958530c Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 19 Jan 2024 17:54:26 -0600 Subject: [PATCH] Use Resource for Glyph Font Family --- .../Image/ImageLoader.cs | 1 + Flow.Launcher/App.axaml | 2 +- .../Resources/CustomControlTemplate.xaml | 8 +- Flow.Launcher/ResultListBox.axaml | 2 +- Flow.Launcher/SettingWindow.xaml | 4 +- Flow.Launcher/ViewModels/MainViewModel.cs | 2 +- Flow.Launcher/ViewModels/ResultViewModel.cs | 23 ++- .../Main.cs | 2 +- .../ContextMenu.cs | 18 +- .../ContextMenu.cs | 28 +-- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +- .../Programs/UWPPackage.cs | 4 +- .../Programs/Win32.cs | 8 +- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 6 +- Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 22 +-- .../WindowsSettings.json | 176 +++++++++--------- 16 files changed, 164 insertions(+), 144 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 5a6e483cd..cae4c3075 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -224,6 +224,7 @@ namespace Flow.Launcher.Infrastructure.Image else if (extension == ".svg") { var source = SvgSource.Load(path, null); + // very annoying, but we need to create the instance on the UI Thread. It is not an expensive operation though image = Dispatcher.UIThread.Invoke(() => new SvgImage() { Source = source }); type = ImageType.FullImageFile; } diff --git a/Flow.Launcher/App.axaml b/Flow.Launcher/App.axaml index 7733ecd15..1d9cc72b7 100644 --- a/Flow.Launcher/App.axaml +++ b/Flow.Launcher/App.axaml @@ -5,7 +5,7 @@ - avares://Flow.Launcher/Resources/#Segoe Fluent Icons + avares://Flow.Launcher/Resources/#Segoe Fluent Icons diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index 505b7c2a3..0104e2de3 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -48,7 +48,7 @@ - +