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

* Revert "[File Explorer Add-ons] Fix file preview pane flickering on file selection and resizing (#26660)"

This reverts commit 9581cd7a27.

* Revert "[Build][FileExplorer]Add missing dwmapi.lib to Debug config (#26940)"

This reverts commit d190934d61.

* Revert "[Build]Fix dwamapi.lib linking error on VS (#26870)"

This reverts commit c7f8b696a6.
This commit is contained in:
Stefan Markovic
2023-06-28 21:57:03 +02:00
committed by GitHub
parent cfc65e8c69
commit 217f3f9ff3
14 changed files with 13 additions and 101 deletions

View File

@@ -77,11 +77,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
/// </summary>
private string _base64FileCode;
public MonacoPreviewHandlerControl()
{
this.SetBackground();
}
[STAThread]
public override void DoPreview<T>(T dataSource)
{
@@ -100,12 +95,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
base.DoPreview(dataSource);
// Sets background color
SetBackground();
// Starts loading screen
InitializeLoadingScreen();
// New webview2 element
_webView = new WebView2();
_webView.DefaultBackgroundColor = Color.Transparent;
// Checks if dataSource is a string
if (!(dataSource is string filePath))

View File

@@ -86,7 +86,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
{
if (GetTheme() == "dark")
{
return Color.FromArgb(30, 30, 30); // #1e1e1e
return System.Drawing.ColorTranslator.FromHtml("#1e1e1e");
}
else
{