mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user