mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-01 18:35:13 +00:00
Set default background color for SVG panel
This commit is contained in:
@@ -103,9 +103,7 @@ public partial class ImagePanel : UserControl, INotifyPropertyChanged, IDisposab
|
||||
ContextObject = context;
|
||||
Meta = meta;
|
||||
|
||||
var s = meta.GetSize();
|
||||
//_minZoomFactor = Math.Min(200d / s.Height, 400d / s.Width);
|
||||
//_maxZoomFactor = Math.Min(9000d / s.Height, 9000d / s.Width);
|
||||
_ = meta.GetSize();
|
||||
|
||||
ShowMeta();
|
||||
Theme = ContextObject.Theme;
|
||||
|
@@ -22,6 +22,7 @@ using QuickLook.Plugin.HtmlViewer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
@@ -67,6 +68,9 @@ public class SvgImagePanel : WebpagePanel, IWebImagePanel
|
||||
{
|
||||
UserDataFolder = Path.Combine(SettingHelper.LocalDataPath, @"WebView2_Data\"),
|
||||
},
|
||||
|
||||
// Prevent white flash in dark mode
|
||||
DefaultBackgroundColor = OSThemeHelper.AppsUseDarkTheme() ? Color.FromArgb(255, 32, 32, 32) : Color.White,
|
||||
};
|
||||
_webView.CoreWebView2InitializationCompleted += WebView_CoreWebView2InitializationCompleted;
|
||||
Content = _webView;
|
||||
|
Reference in New Issue
Block a user