Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
90bca11717 Add Svelte syntax highlighting support for Dark and Light themes
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-11-19 11:05:01 +00:00
copilot-swe-agent[bot]
94815bec40 Initial plan 2025-11-19 10:58:50 +00:00
4 changed files with 11 additions and 19 deletions

View File

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

View File

@@ -109,7 +109,7 @@ internal class ImageMagickProvider : AnimationProvider
{
if (mi.ColorSpace == ColorSpace.RGB || mi.ColorSpace == ColorSpace.sRGB || mi.ColorSpace == ColorSpace.scRGB)
{
mi.SetProfile(ColorProfiles.SRGB);
mi.SetProfile(ColorProfile.SRGB);
if (ContextObject.ColorProfileName != null)
mi.SetProfile(new ColorProfile(ContextObject.ColorProfileName)); // map to monitor color
}

View File

@@ -351,7 +351,7 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
private void ChangeVolume(double delta)
{
LinearVolume = Math.Max(0d, Math.Min(1d, LinearVolume + delta));
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 > 360d)
if (rotation > 360)
rotation /= 1e3;
if (Math.Abs(rotation) > 0.1d)
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5d, 0.5d);
if (Math.Abs(rotation) > 0.1)
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5, 0.5);
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 = Math.Max(0d, Math.Min(1d, SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer")));
LinearVolume = SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer");
mediaElement.Play();
}

View File

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