mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Peek]Force white background on html after WebView2 update (#29995)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.UI;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
@@ -135,7 +136,8 @@ namespace Peek.FilePreviewer.Controls
|
||||
// Storing the original background color so it can be reset later for specific file types like HTML.
|
||||
if (!_originalBackgroundColor.HasValue)
|
||||
{
|
||||
_originalBackgroundColor = PreviewBrowser.DefaultBackgroundColor;
|
||||
// HACK: We used to store PreviewBrowser.DefaultBackgroundColor here, but WebView started returning transparent when running without a debugger attached. We want html files to be seen as in the browser, which has white as a default background color.
|
||||
_originalBackgroundColor = Colors.White;
|
||||
}
|
||||
|
||||
// Setting the background color to transparent when initially loading the WebView2 component.
|
||||
|
||||
Reference in New Issue
Block a user