diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml.cs index 6196dd1..11419b5 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/ImagePanel.xaml.cs @@ -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; diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Webview/Svg/SvgImagePanel.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Webview/Svg/SvgImagePanel.cs index d5d7052..028f999 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Webview/Svg/SvgImagePanel.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Webview/Svg/SvgImagePanel.cs @@ -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;