Compare commits

..

5 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
99b11a08be Add ShowInTaskbar setting to display window in taskbar
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-11-25 16:11:05 +00:00
copilot-swe-agent[bot]
897cfa5804 Initial plan 2025-11-25 15:59:18 +00:00
copilot-swe-agent[bot]
d7edd92204 Fix DOpus crash when QuickLook runs with different privilege level 2025-11-25 23:49:22 +08:00
Copilot
cbf3e566d9 Fix volume control exceeding limits during mouse wheel scroll (#1814)
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
* Fix mouse scroll volume adjustment by clamping value to valid range [0.0, 1.0]
2025-11-25 00:18:36 +08:00
ema
f41fb0a68e Fix warning ColorProfile reference in ImageMagickProvider
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
QuickLook\QuickLook.Plugin\QuickLook.Plugin.ImageViewer\AnimatedImage\Providers\ImageMagickProvider.cs(112,35,112,52): warning CS0618: 'ColorProfile.SRGB' is obsolete: 'This property will be removed in the next major release. Use ColorProfiles.SRGB instead.'

Revert "Fix wwarning ColorProfile reference in ImageMagickProvider"

This reverts commit 649fd3a892.

Reapply "Fix wwarning ColorProfile reference in ImageMagickProvider"

This reverts commit 5e9dea6af313ec03c40b1f4dcaa461643a02d4f2.
2025-11-21 00:38:01 +08:00
4 changed files with 19 additions and 11 deletions

View File

@@ -30,7 +30,7 @@
HWND hMsgWnd;
HANDLE hGetResultEvent;
PCHAR pXmlBuffer;
PCHAR pXmlBuffer = nullptr;
void DOpus::GetSelected(PWCHAR buffer)
{
@@ -72,9 +72,12 @@ void DOpus::GetSelected(PWCHAR buffer)
WaitForSingleObject(hGetResultEvent, 2000);
ParseXmlBuffer(buffer);
delete[] pXmlBuffer;
if (pXmlBuffer != nullptr)
{
ParseXmlBuffer(buffer);
delete[] pXmlBuffer;
pXmlBuffer = nullptr;
}
}
void DOpus::ParseXmlBuffer(PWCHAR buffer)
@@ -88,6 +91,9 @@ void DOpus::ParseXmlBuffer(PWCHAR buffer)
* ...
*/
if (pXmlBuffer == nullptr)
return;
using namespace rapidxml;
xml_document<> doc;

View File

@@ -351,7 +351,7 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
private void ChangeVolume(double delta)
{
LinearVolume += delta;
LinearVolume = Math.Max(0d, Math.Min(1d, LinearVolume + delta));
}
private void TogglePlayPause(object sender, EventArgs e)
@@ -385,16 +385,16 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
UpdateMeta(path, info);
// detect rotation
double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
_ = double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
// Correct rotation: on some machine the value "90" becomes "90000" by some reason
if (rotation > 360)
if (rotation > 360d)
rotation /= 1e3;
if (Math.Abs(rotation) > 0.1)
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5, 0.5);
if (Math.Abs(rotation) > 0.1d)
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5d, 0.5d);
mediaElement.Source = new Uri(path);
// old plugin use an int-typed "Volume" config key ranged from 0 to 100. Let's use a new one here.
LinearVolume = SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer");
LinearVolume = Math.Max(0d, Math.Min(1d, SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer")));
mediaElement.Play();
}

View File

@@ -64,6 +64,8 @@ public partial class ViewerWindow : Window
Topmost = SettingHelper.Get("Topmost", false);
buttonTop.Tag = Topmost ? "Top" : "Auto";
ShowInTaskbar = SettingHelper.Get("ShowInTaskbar", false);
buttonTop.Click += (_, _) =>
{
Topmost = !Topmost;