diff --git a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs index 1e32edb..f8d6c75 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Plugin.cs @@ -152,12 +152,11 @@ public class Plugin : IViewer var sizeSvg = _metaSvg.GetSize(); - context.ViewerContent = _ip; + context.ViewerContent = _ipSvg; context.Title = sizeSvg.IsEmpty ? $"{Path.GetFileName(path)}" : $"{sizeSvg.Width}×{sizeSvg.Height}: {Path.GetFileName(path)}"; - context.ViewerContent = _ipSvg; context.IsBusy = false; return; } @@ -174,7 +173,7 @@ public class Plugin : IViewer _ip.ImageUriSource = Helper.FilePathToFileUrl(path); // Load the custom cursor into the preview panel - if (new string[] { ".cur", ".ani" }.Any(path.ToLower().EndsWith)) + if (new[] { ".cur", ".ani" }.Any(ext => path.EndsWith(ext, StringComparison.OrdinalIgnoreCase))) { _ip.Cursor = CursorProvider.GetCursor(path) ?? Cursors.Arrow; } diff --git a/QuickLook/ViewerWindow.xaml.cs b/QuickLook/ViewerWindow.xaml.cs index 9995e98..e29b893 100644 --- a/QuickLook/ViewerWindow.xaml.cs +++ b/QuickLook/ViewerWindow.xaml.cs @@ -20,11 +20,10 @@ using QuickLook.Common.Helpers; using QuickLook.Common.Plugin; using QuickLook.Helpers; using System; -using System.Runtime.InteropServices; +using System.IO; using System.Windows; using System.Windows.Input; using System.Windows.Media.Animation; -using System.IO; using Wpf.Ui.Violeta.Controls; using Brush = System.Windows.Media.Brush; using FontFamily = System.Windows.Media.FontFamily;