mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
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:
@@ -422,6 +422,9 @@
|
||||
</data>
|
||||
<data name="FileExplorerPreview_ToggleSwitch_Preview_SVG.Header" xml:space="preserve">
|
||||
<value>Enable SVG (.svg) preview</value>
|
||||
</data>
|
||||
<data name="FileExplorerPreview_ToggleSwitch_SVG_Thumbnail.Header" xml:space="preserve">
|
||||
<value>Enable SVG (.svg) thumbnails</value>
|
||||
</data>
|
||||
<data name="FileExplorerPreview_Description.Text" xml:space="preserve">
|
||||
<value>These settings allow you to manage your Windows File Explorer custom preview handlers.</value>
|
||||
|
||||
@@ -27,12 +27,14 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
SettingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName);
|
||||
}
|
||||
|
||||
this._svgRenderIsEnabled = Settings.properties.EnableSvg;
|
||||
this._mdRenderIsEnabled = Settings.properties.EnableMd;
|
||||
this._svgRenderIsEnabled = Settings.properties.EnableSvgPreview;
|
||||
this._svgThumbnailIsEnabled = Settings.properties.EnableSvgThumbnail;
|
||||
this._mdRenderIsEnabled = Settings.properties.EnableMdPreview;
|
||||
}
|
||||
|
||||
private bool _svgRenderIsEnabled = false;
|
||||
private bool _mdRenderIsEnabled = false;
|
||||
private bool _svgThumbnailIsEnabled = false;
|
||||
|
||||
public bool SVGRenderIsEnabled
|
||||
{
|
||||
@@ -46,7 +48,25 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
if (value != _svgRenderIsEnabled)
|
||||
{
|
||||
_svgRenderIsEnabled = value;
|
||||
Settings.properties.EnableSvg = value;
|
||||
Settings.properties.EnableSvgPreview = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool SVGThumbnailIsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return _svgThumbnailIsEnabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _svgThumbnailIsEnabled)
|
||||
{
|
||||
_svgThumbnailIsEnabled = value;
|
||||
Settings.properties.EnableSvgThumbnail = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
@@ -64,7 +84,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
if (value != _mdRenderIsEnabled)
|
||||
{
|
||||
_mdRenderIsEnabled = value;
|
||||
Settings.properties.EnableMd = value;
|
||||
Settings.properties.EnableMdPreview = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
Margin="{StaticResource MediumTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=SVGRenderIsEnabled}" />
|
||||
|
||||
<ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_SVG_Thumbnail"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=SVGThumbnailIsEnabled}" />
|
||||
|
||||
<ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_Preview_MD"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsOn="{Binding Mode=TwoWay, Path=MDRenderIsEnabled}" />
|
||||
|
||||
Reference in New Issue
Block a user