Revert "Revert "[File Explorer Add-ons] Fix file preview pane flickering on f… (#27093)" (#27122)

This reverts commit 217f3f9ff3.
This commit is contained in:
Stefan Markovic
2023-06-30 18:44:12 +02:00
committed by GitHub
parent 03a5a4200e
commit 2dcaa526cb
14 changed files with 101 additions and 13 deletions

View File

@@ -83,6 +83,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
/// </summary>
public MarkdownPreviewHandlerControl()
{
this.SetBackgroundColor(Settings.BackgroundColor);
}
/// <summary>
@@ -121,11 +122,12 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
_infoBarDisplayed = true;
}
string markdownHTML = FilePreviewCommon.MarkdownHelper.MarkdownHtml(fileText, Common.UI.ThemeManager.GetWindowsBaseColor().ToLowerInvariant(), filePath, ImagesBlockedCallBack);
string markdownHTML = FilePreviewCommon.MarkdownHelper.MarkdownHtml(fileText, Settings.GetTheme(), filePath, ImagesBlockedCallBack);
_browser = new WebView2()
{
Dock = DockStyle.Fill,
DefaultBackgroundColor = Color.Transparent,
};
var webView2Options = new CoreWebView2EnvironmentOptions("--block-new-web-contents");