From b3570d1215bb190679861dc5533af7de9252f72d Mon Sep 17 00:00:00 2001 From: ema Date: Sat, 5 Jul 2025 06:55:38 +0800 Subject: [PATCH] Handle .svga files separately in image viewer --- .../QuickLook.Plugin.ImageViewer/Plugin.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs index 1bbefc8..5320d8a 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs @@ -114,8 +114,7 @@ public class Plugin : IViewer public void Prepare(string path, ContextObject context) { - if (path.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) - || path.EndsWith(".svga", StringComparison.OrdinalIgnoreCase)) + if (path.EndsWith(".svg", StringComparison.OrdinalIgnoreCase)) { if (SettingHelper.Get("RenderSvgWeb", true, "QuickLook.Plugin.ImageViewer")) { @@ -131,6 +130,14 @@ public class Plugin : IViewer return; } } + else if (path.EndsWith(".svga", StringComparison.OrdinalIgnoreCase)) + { + _metaSvg = new SvgMetaProvider(path); + + context.PreferredSize = new Size(800, 600); + context.Theme = (Themes)SettingHelper.Get("LastTheme", 1, "QuickLook.Plugin.ImageViewer"); + return; + } _meta = new MetaProvider(path);