Handle .svga files separately in image viewer

This commit is contained in:
ema
2025-07-05 06:55:38 +08:00
parent eecb56db14
commit b3570d1215

View File

@@ -114,8 +114,7 @@ public class Plugin : IViewer
public void Prepare(string path, ContextObject context) public void Prepare(string path, ContextObject context)
{ {
if (path.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) if (path.EndsWith(".svg", StringComparison.OrdinalIgnoreCase))
|| path.EndsWith(".svga", StringComparison.OrdinalIgnoreCase))
{ {
if (SettingHelper.Get("RenderSvgWeb", true, "QuickLook.Plugin.ImageViewer")) if (SettingHelper.Get("RenderSvgWeb", true, "QuickLook.Plugin.ImageViewer"))
{ {
@@ -131,6 +130,14 @@ public class Plugin : IViewer
return; 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); _meta = new MetaProvider(path);