SvgPreviewControl: Add Background so that white .svg are visible (#25397)

* SvgPreviewControl: Add checkered background so that white .svg are visible

* SvgPreviewControl: Move preview generation logic into own class

* SvgPreviewControl: Add possibility to configure background of svg preview pane via the settings ui

* SvgPreviewControl: Take user configuration into consideration when generating svg preview

* SvgPreviewControl: Do not generate preview file, if the actual size is under the 2mb limiation of WebView2

* SvgPreviewControl: Introduce SvgPreviewColorMode enumeration instead of using magic values

* SvgPreviewControl: Add additional checkered pattern shades

* SvgPreviewControl: Use newly introduced enums as default values
This commit is contained in:
Sebastian Zanoni
2023-04-21 18:54:57 +02:00
committed by GitHub
parent 3164e03ad4
commit 3a63a088ed
11 changed files with 328 additions and 6 deletions

View File

@@ -762,6 +762,33 @@
<value>.svg</value>
<comment>File extension, should not be altered</comment>
</data>
<data name="FileExplorerPreview_Preview_SVG_Color_Mode.Header" xml:space="preserve">
<value>Color mode</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Color_Mode_Default.Content" xml:space="preserve">
<value>Windows default</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Color_Solid_Color.Content" xml:space="preserve">
<value>Solid color</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Checkered_Shade.Content" xml:space="preserve">
<value>Checkered pattern</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Background_Color.Header" xml:space="preserve">
<value>Color</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Checkered_Shade_Mode.Header" xml:space="preserve">
<value>Checkered shade</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Checkered_Shade_1.Content" xml:space="preserve">
<value>Light</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Checkered_Shade_2.Content" xml:space="preserve">
<value>Medium</value>
</data>
<data name="FileExplorerPreview_Preview_SVG_Checkered_Shade_3.Content" xml:space="preserve">
<value>Dark</value>
</data>
<data name="FileExplorerPreview_ToggleSwitch_Preview_PDF.Header" xml:space="preserve">
<value>Portable Document Format</value>
<comment>File type, do not translate</comment>