mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
[FileExplorer-Add-ons][SVG] Preprocess svg thumbnail before previewing (#18685)
* [FileExplorer-Add-ons][SVG Thumbnail] Preprocess svg thumbnail before previewing same logic is usedas for preview handler * Fix build
This commit is contained in:
@@ -12,7 +12,6 @@ using System.Windows.Forms;
|
||||
using Common;
|
||||
using Common.Utilities;
|
||||
using Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events;
|
||||
using Microsoft.PowerToys.PreviewHandler.Svg.Utilities;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
|
||||
@@ -252,6 +252,13 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
svgData = reader.ReadToEnd();
|
||||
try
|
||||
{
|
||||
svgData = SvgPreviewHandlerHelper.AddStyleSVG(svgData);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text;
|
||||
using Microsoft.PowerToys.PreviewHandler.Svg.Utilities;
|
||||
using Common.Utilities;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Microsoft.PowerToys.PreviewHandler.Svg.Utilities
|
||||
namespace Common.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper utilities for Svg Preview Handler.
|
||||
Reference in New Issue
Block a user