Add SVG Thumbnail Provider for Windows Explorer (#5048)

* Add SVG Thumbnail Provider

* Some cleanup

* Small settings changes

* Update PowerToys.sln

Remove Any CPU entries

* Fix project configuration issues

* Fix bad merge

* Update output path for SVG thumbnail provider

* Sync with latest
This commit is contained in:
Chris Davis
2020-07-21 16:27:12 -07:00
committed by GitHub
parent 8e5a877997
commit 40d2ef4f0a
28 changed files with 1610 additions and 687 deletions

View File

@@ -59,13 +59,30 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg =>
{
SndModuleSettings<SndPowerPreviewSettings> snd = JsonSerializer.Deserialize<SndModuleSettings<SndPowerPreviewSettings>>(msg);
Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableSvg);
Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableSvgPreview);
};
// act
viewModel.SVGRenderIsEnabled = true;
}
[TestMethod]
public void SVGThumbnailIsEnabled_ShouldPrevHandler_WhenSuccessful()
{
// arrange
PowerPreviewViewModel viewModel = new PowerPreviewViewModel();
// Assert
ShellPage.DefaultSndMSGCallback = msg =>
{
SndModuleSettings<SndPowerPreviewSettings> snd = JsonSerializer.Deserialize<SndModuleSettings<SndPowerPreviewSettings>>(msg);
Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableSvgThumbnail);
};
// act
viewModel.SVGThumbnailIsEnabled = true;
}
[TestMethod]
public void MDRenderIsEnabled_ShouldPrevHandler_WhenSuccessful()
{
@@ -76,7 +93,7 @@ namespace ViewModelTests
ShellPage.DefaultSndMSGCallback = msg =>
{
SndModuleSettings<SndPowerPreviewSettings> snd = JsonSerializer.Deserialize<SndModuleSettings<SndPowerPreviewSettings>>(msg);
Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableMd);
Assert.IsTrue(snd.powertoys.FileExplorerPreviewSettings.properties.EnableMdPreview);
};
// act