[FileExplorer]Add QoiThumbnailProvider and QoiPreviewHandler (#29735)

* [FileExplorer]QoiThumbnailProvider

* Corrects code documentation

* Adds QoiPreviewHandler

* Corrects GUIDs

* Ensure returned thumbnail image is 32bit ARGB

* Updates following review comments

* More updates following review comments

* Updates following PR comments

* Fix dark theme background in QoiPreviewHandler

* Updates attribution text
This commit is contained in:
Pedro Lamas
2023-11-14 15:41:09 +00:00
committed by GitHub
parent 9d2f9bcff2
commit 0990724e44
70 changed files with 2970 additions and 8 deletions

View File

@@ -221,6 +221,40 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("stl-thumbnail-color-setting")]
public StringProperty StlThumbnailColor { get; set; }
private bool enableQoiPreview = true;
[JsonPropertyName("qoi-previewer-toggle-setting")]
[JsonConverter(typeof(BoolPropertyJsonConverter))]
public bool EnableQoiPreview
{
get => enableQoiPreview;
set
{
if (value != enableQoiPreview)
{
LogTelemetryEvent(value);
enableQoiPreview = value;
}
}
}
private bool enableQoiThumbnail = true;
[JsonPropertyName("qoi-thumbnail-toggle-setting")]
[JsonConverter(typeof(BoolPropertyJsonConverter))]
public bool EnableQoiThumbnail
{
get => enableQoiThumbnail;
set
{
if (value != enableQoiThumbnail)
{
LogTelemetryEvent(value);
enableQoiThumbnail = value;
}
}
}
public PowerPreviewProperties()
{
SvgBackgroundColorMode = new IntProperty(DefaultSvgBackgroundColorMode);