mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-16 05:12:39 +00:00
Fix image viewer content assignment and cursor check
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user