Compare commits

..

14 Commits

Author SHA1 Message Date
dependabot[bot]
08cee2211e Bump Magick.NET-Q8-AnyCPU from 14.9.1 to 14.10.0
---
updated-dependencies:
- dependency-name: Magick.NET-Q8-AnyCPU
  dependency-version: 14.10.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 15:50:08 +00:00
ema
2721df459d Update changelog for 4.3.0 release
Some checks failed
build / build (push) Has been cancelled
build / publish (push) Has been cancelled
2025-12-10 00:24:26 +08:00
ema
85b1e9b024 Update NuGet package versions in plugin projects 2025-12-09 23:57:57 +08:00
ema
291ab79822 Remove AppVeyor badge and references from README
Eliminated the AppVeyor build badge and related nightly build reference from the README, reflecting a shift to GitHub Actions for CI and nightly builds.
2025-12-09 23:32:10 +08:00
ema
11961088f1 Update CI workflow and README badges
Renamed the MSBuild workflow to 'build' and updated actions/checkout to v4 in the workflow file. Added GitHub Actions badge to README and reordered platform badge for improved visibility.
2025-12-09 23:29:14 +08:00
ema
c5b4014fad Add Windows platform badge to README
A badge indicating Windows as the supported platform has been added to the README for clearer platform identification.
2025-12-09 23:23:23 +08:00
ema
7211c2ebdd Update PowerShell syntax colors in dark theme
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
Changed the color values for Keywords2 and Keywords3 in the PowerShell.xshd dark theme file to use specific hex codes instead of named colors for improved consistency and appearance.
2025-12-05 13:40:57 +08:00
ema
76dfa34928 Update NuGet package versions in project files
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
Upgraded several NuGet dependencies across multiple csproj files, including Microsoft.Web.WebView2, Google.Protobuf, MsgReader, bblanchon.PDFiumV8.Win32, and Lib.Harmony. This ensures compatibility with the latest features and bug fixes from upstream packages.
2025-11-26 01:07:28 +08:00
Copilot
bf7de3bd8e Add ShowInTaskbar setting to display window in taskbar (#1818) 2025-11-26 00:52:12 +08:00
Copilot
1adb7ce980 Add option to disable automatic update check at startup (#1819) 2025-11-26 00:45:15 +08: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
Copilot
1f96cf5745 Add Svelte syntax highlighting support (#1809) 2025-11-20 00:01:34 +08:00
24 changed files with 284 additions and 169 deletions

View File

@@ -1,6 +1,6 @@
# run a build for the latest version and upload the artifacts to a "latest" pre-release
name: MSBuild
name: build
on:
push:
@@ -26,7 +26,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

View File

@@ -1,3 +1,14 @@
## 4.3.0
- Add Svelte syntax highlighting support
- Add ShowInTaskbar setting to display window in taskbar [#1789](https://github.com/QL-Win/QuickLook/issues/1789)
- Add option to disable automatic update check at startup [#1801](https://github.com/QL-Win/QuickLook/issues/1801)
- Update PowerShell syntax colors in dark theme
- Improve TextViewerPanel UI and usability
- Fix DOpus crash when QuickLook runs with different privilege level [#1781](https://github.com/QL-Win/QuickLook/issues/1781)
- Fix volume control exceeding limits during mouse wheel scroll [#1813](https://github.com/QL-Win/QuickLook/issues/1813)
- Fix error in RTF file originating from version 4.2.1 [#1826](https://github.com/QL-Win/QuickLook/issues/1826)
## 4.2.2
- Fix version display issue [#1776](https://github.com/QL-Win/QuickLook/issues/1776)

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

@@ -73,7 +73,7 @@
<ItemGroup>
<PackageReference Include="FreeTypeSharp" Version="3.0.1" />
<PackageReference Include="QuickLook.Typography.OpenFont" Version="1.0.1" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3650.58">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

View File

@@ -61,7 +61,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3650.58">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

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(ColorProfile.SRGB);
mi.SetProfile(ColorProfiles.SRGB);
if (ContextObject.ColorProfileName != null)
mi.SetProfile(new ColorProfile(ContextObject.ColorProfileName)); // map to monitor color
}

View File

@@ -59,13 +59,13 @@
<PackageReference Include="QuickLook.ImageGlass.WebP" Version="1.4.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.9.1">
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.10.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3650.58">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Google.Protobuf" Version="3.33.0">
<PackageReference Include="Google.Protobuf" Version="3.33.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Memory" Version="4.6.3">

View File

@@ -35,10 +35,6 @@ public class LottieImagePanel : SvgImagePanel
ObjectForScripting ??= new ScriptHandler(path);
_homePage = _resources["/lottie2html.html"];
// Update WebView2 background color based on current theme
UpdateWebViewBackgroundColor();
NavigateToUri(new Uri("file://quicklook/"));
}

View File

@@ -18,7 +18,6 @@
using Microsoft.Web.WebView2.Core;
using Microsoft.Web.WebView2.Wpf;
using QuickLook.Common.Helpers;
using QuickLook.Common.Plugin;
using QuickLook.Plugin.HtmlViewer;
using System;
using System.Collections.Generic;
@@ -30,36 +29,17 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace QuickLook.Plugin.ImageViewer.Webview.Svg;
public partial class SvgImagePanel : UserControl, IWebImagePanel
public class SvgImagePanel : WebpagePanel, IWebImagePanel
{
protected const string _resourcePrefix = "QuickLook.Plugin.ImageViewer.Resources.";
protected internal static readonly Dictionary<string, byte[]> _resources = [];
protected byte[] _homePage;
protected WebView2 _webView;
protected Uri _currentUri;
protected string _primaryPath;
protected string _fallbackPath;
private ContextObject _contextObject;
private object _objectForScripting;
public string FallbackPath
{
get => _fallbackPath;
set => _fallbackPath = value;
}
public ContextObject ContextObject
{
get => _contextObject;
set => _contextObject = value;
}
public object ObjectForScripting
{
get => _objectForScripting;
@@ -80,21 +60,7 @@ public partial class SvgImagePanel : UserControl, IWebImagePanel
InitializeResources();
}
public SvgImagePanel()
{
InitializeComponent();
// Clear merged dictionaries from design time
Resources.MergedDictionaries.Clear();
// Initialize WebView2
InitializeWebView();
// Wire up the theme toggle button
buttonBackgroundColour.Click += OnBackgroundColourOnClick;
}
protected void InitializeWebView()
protected override void InitializeComponent()
{
_webView = new WebView2()
{
@@ -105,53 +71,7 @@ public partial class SvgImagePanel : UserControl, IWebImagePanel
DefaultBackgroundColor = Color.Transparent,
};
_webView.CoreWebView2InitializationCompleted += WebView_CoreWebView2InitializationCompleted;
// Add WebView2 to the Grid at the first position (behind the button)
var grid = (Grid)Content;
grid.Children.Insert(0, _webView);
}
private void OnBackgroundColourOnClick(object sender, RoutedEventArgs e)
{
if (ContextObject == null) return;
// Toggle the theme
var newTheme = ContextObject.Theme == Themes.Dark ? Themes.Light : Themes.Dark;
ContextObject.Theme = newTheme;
// Save the theme preference
SettingHelper.Set("LastTheme", (int)newTheme, "QuickLook.Plugin.ImageViewer");
// Update WebView2 background color
UpdateWebViewBackgroundColor();
}
protected void UpdateWebViewBackgroundColor()
{
if (_webView == null) return;
var isDark = ContextObject?.Theme == Themes.Dark;
_webView.DefaultBackgroundColor = isDark
? Color.FromArgb(255, 32, 32, 32)
: Color.White;
}
public void NavigateToUri(Uri uri)
{
if (_webView == null)
return;
_webView.Source = uri;
_currentUri = _webView.Source;
}
protected virtual void WebView_CoreWebView2InitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e)
{
if (e.IsSuccess)
{
_webView.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All);
_webView.CoreWebView2.WebResourceRequested += WebView_WebResourceRequested;
}
Content = _webView;
}
protected static void InitializeResources()
@@ -182,14 +102,10 @@ public partial class SvgImagePanel : UserControl, IWebImagePanel
ObjectForScripting ??= new ScriptHandler(path);
_homePage = _resources["/svg2html.html"];
// Update WebView2 background color based on current theme
UpdateWebViewBackgroundColor();
NavigateToUri(new Uri("file://quicklook/"));
}
protected virtual void WebView_WebResourceRequested(object sender, CoreWebView2WebResourceRequestedEventArgs args)
protected override void WebView_WebResourceRequested(object sender, CoreWebView2WebResourceRequestedEventArgs args)
{
Debug.WriteLine($"[{args.Request.Method}] {args.Request.Uri}");
@@ -270,13 +186,7 @@ public partial class SvgImagePanel : UserControl, IWebImagePanel
return reader.ReadToEnd();
}
public void Dispose()
{
_webView?.Dispose();
_webView = null;
}
public static class MimeTypes
public new static class MimeTypes
{
public static string GetContentTypeHeader(string extension = null)
=> $"Content-Type: {WebpagePanel.MimeTypes.GetMimeType(extension)}";

View File

@@ -1,32 +0,0 @@
<UserControl x:Class="QuickLook.Plugin.ImageViewer.Webview.Svg.SvgImagePanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="svgImagePanel"
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- only for design -->
<ResourceDictionary Source="/QuickLook.Common;component/Styles/MainWindowStyles.xaml" />
<ResourceDictionary Source="/QuickLook.Common;component/Styles/MainWindowStyles.Dark.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<!-- WebView2 will be added here programmatically -->
<StackPanel Margin="0,8,8,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Orientation="Horizontal">
<Button x:Name="buttonBackgroundColour"
Width="24"
Height="24"
Content="&#xEF1F;"
Style="{StaticResource CaptionButtonStyle}" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -34,10 +34,6 @@ public class SvgaImagePanel(IWebMetaProvider metaWeb) : SvgImagePanel()
ObjectForScripting ??= new ScriptHandler(path, _metaWeb);
_homePage = _resources["/svga2html.html"];
// Update WebView2 background color based on current theme
UpdateWebViewBackgroundColor();
NavigateToUri(new Uri("file://quicklook/"));
}
}

View File

@@ -35,10 +35,6 @@ public class TgsImagePanel : SvgImagePanel
ObjectForScripting ??= new TgsScriptHandler(path);
_homePage = _resources["/lottie2html.html"];
// Update WebView2 background color based on current theme
UpdateWebViewBackgroundColor();
NavigateToUri(new Uri("file://quicklook/"));
}

View File

@@ -102,10 +102,10 @@ internal static class WebHandler
ipWeb = ext switch
{
".svg" => new SvgImagePanel() { ContextObject = context },
".svga" => new SvgaImagePanel(metaWeb) { ContextObject = context },
".lottie" or ".json" => new LottieImagePanel() { ContextObject = context },
".tgs" => new TgsImagePanel() { ContextObject = context },
".svg" => new SvgImagePanel(),
".svga" => new SvgaImagePanel(metaWeb),
".lottie" or ".json" => new LottieImagePanel(),
".tgs" => new TgsImagePanel(),
_ => throw new NotSupportedException($"Unsupported file type: {ext}")
};

View File

@@ -55,7 +55,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MsgReader" Version="6.0.5" />
<PackageReference Include="MsgReader" Version="6.0.6" />
</ItemGroup>
<ItemGroup>

View File

@@ -61,7 +61,7 @@
<ItemGroup>
<PackageReference Include="UTF.Unknown" Version="2.6.0" />
<Reference Include="WindowsBase" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3650.58">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

View File

@@ -64,7 +64,7 @@
<ItemGroup>
<PackageReference Include="PdfiumViewer.Updated" Version="2.14.5" />
<PackageReference Include="bblanchon.PDFiumV8.Win32" Version="143.0.7497" />
<PackageReference Include="bblanchon.PDFiumV8.Win32" Version="145.0.7568" />
<Reference Include="WindowsBase" />
</ItemGroup>

View File

@@ -93,7 +93,7 @@
<Key word="workflow"/>
</KeyWords>
<KeyWords name="Keywords2" color="Purple" bold="false" italic="false">
<KeyWords name="Keywords2" color="#D8A0DF" bold="false" italic="false">
<Key word="Add-Computer"/>
<Key word="Add-Content"/>
<Key word="Add-History"/>
@@ -439,7 +439,7 @@
<Key word="Write-Zip"/>
</KeyWords>
<KeyWords name="Keywords3" color="Teal" bold="false" italic="false">
<KeyWords name="Keywords3" color="#80CBC4" bold="false" italic="false">
<Key word="ac"/>
<Key word="asnp"/>
<Key word="cat"/>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="Svelte" extensions=".svelte" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="#6A9955" />
<Color name="Tag" foreground="#569CD6" exampleText="div" />
<Color name="Attribute" foreground="#9CDCFE" exampleText="on:click" />
<Color name="String" foreground="#CE9178" exampleText="&quot;text&quot;" />
<Color name="Directive" foreground="#DCDCAA" exampleText="bind:" />
<Color name="Keyword" foreground="#C586C0" exampleText="import" />
<Color name="Script" foreground="#D4D4D4" />
<Color name="Style" foreground="#4EC9B0" />
<RuleSet name="Html">
<Span color="Comment" begin="&lt;!--" end="--&gt;" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
<!-- Tags -->
<Span color="Tag" begin="&lt;" end="&gt;">
<RuleSet>
<Keywords color="Tag">
<Word>script</Word>
<Word>style</Word>
<Word>div</Word>
<Word>span</Word>
<Word>input</Word>
<Word>button</Word>
<Word>section</Word>
<Word>article</Word>
<Word>header</Word>
<Word>footer</Word>
<Word>main</Word>
<Word>nav</Word>
<Word>aside</Word>
<Word>p</Word>
<Word>h1</Word>
<Word>h2</Word>
<Word>h3</Word>
<Word>ul</Word>
<Word>li</Word>
<Word>a</Word>
<Word>img</Word>
</Keywords>
<Keywords color="Directive">
<Word>bind:</Word>
<Word>on:</Word>
<Word>use:</Word>
<Word>transition:</Word>
<Word>in:</Word>
<Word>out:</Word>
<Word>animate:</Word>
<Word>class:</Word>
<Word>style:</Word>
</Keywords>
<Keywords color="Attribute">
<Word>export</Word>
<Word>let</Word>
<Word>const</Word>
</Keywords>
</RuleSet>
</Span>
</RuleSet>
<RuleSet name="JavaScript">
<Span color="Comment" begin="//" end="\n" />
<Span color="Comment" begin="/\*" end="\*/" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
<Keywords color="Keyword">
<Word>import</Word>
<Word>export</Word>
<Word>default</Word>
<Word>return</Word>
<Word>const</Word>
<Word>let</Word>
<Word>var</Word>
<Word>if</Word>
<Word>else</Word>
<Word>for</Word>
<Word>while</Word>
<Word>function</Word>
<Word>async</Word>
<Word>await</Word>
<Word>new</Word>
<Word>this</Word>
<Word>true</Word>
<Word>false</Word>
<Word>null</Word>
<Word>undefined</Word>
<Word>each</Word>
<Word>if</Word>
<Word>else</Word>
<Word>await</Word>
<Word>then</Word>
<Word>catch</Word>
</Keywords>
</RuleSet>
<RuleSet name="CSS">
<Span color="Comment" begin="/\*" end="\*/" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
</RuleSet>
<RuleSet name="MainRuleSet">
<Import ruleSet="Html" />
<Import ruleSet="JavaScript" />
<Import ruleSet="CSS" />
</RuleSet>
<RuleSet>
<Import ruleSet="MainRuleSet" />
</RuleSet>
</SyntaxDefinition>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="Svelte" extensions=".svelte" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="#008000" />
<Color name="Tag" foreground="#800000" exampleText="div" />
<Color name="Attribute" foreground="#0000FF" exampleText="on:click" />
<Color name="String" foreground="#A31515" exampleText="&quot;text&quot;" />
<Color name="Directive" foreground="#B000B0" exampleText="bind:" />
<Color name="Keyword" foreground="#000080" exampleText="import" />
<Color name="Script" foreground="#333333" />
<Color name="Style" foreground="#0055A5" />
<RuleSet name="Html">
<Span color="Comment" begin="&lt;!--" end="--&gt;" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
<!-- Tags -->
<Span color="Tag" begin="&lt;" end="&gt;">
<RuleSet>
<Keywords color="Tag">
<Word>script</Word>
<Word>style</Word>
<Word>div</Word>
<Word>span</Word>
<Word>input</Word>
<Word>button</Word>
<Word>section</Word>
<Word>article</Word>
<Word>header</Word>
<Word>footer</Word>
<Word>main</Word>
<Word>nav</Word>
<Word>aside</Word>
<Word>p</Word>
<Word>h1</Word>
<Word>h2</Word>
<Word>h3</Word>
<Word>ul</Word>
<Word>li</Word>
<Word>a</Word>
<Word>img</Word>
</Keywords>
<Keywords color="Directive">
<Word>bind:</Word>
<Word>on:</Word>
<Word>use:</Word>
<Word>transition:</Word>
<Word>in:</Word>
<Word>out:</Word>
<Word>animate:</Word>
<Word>class:</Word>
<Word>style:</Word>
</Keywords>
<Keywords color="Attribute">
<Word>export</Word>
<Word>let</Word>
<Word>const</Word>
</Keywords>
</RuleSet>
</Span>
</RuleSet>
<RuleSet name="JavaScript">
<Span color="Comment" begin="//" end="\n" />
<Span color="Comment" begin="/\*" end="\*/" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
<Keywords color="Keyword">
<Word>import</Word>
<Word>export</Word>
<Word>default</Word>
<Word>return</Word>
<Word>const</Word>
<Word>let</Word>
<Word>var</Word>
<Word>if</Word>
<Word>else</Word>
<Word>for</Word>
<Word>while</Word>
<Word>function</Word>
<Word>async</Word>
<Word>await</Word>
<Word>new</Word>
<Word>this</Word>
<Word>true</Word>
<Word>false</Word>
<Word>null</Word>
<Word>undefined</Word>
<Word>each</Word>
<Word>if</Word>
<Word>else</Word>
<Word>await</Word>
<Word>then</Word>
<Word>catch</Word>
</Keywords>
</RuleSet>
<RuleSet name="CSS">
<Span color="Comment" begin="/\*" end="\*/" />
<Span color="String" begin="&quot;" end="&quot;" />
<Span color="String" begin="&apos;" end="&apos;" />
</RuleSet>
<RuleSet name="MainRuleSet">
<Import ruleSet="Html" />
<Import ruleSet="JavaScript" />
<Import ruleSet="CSS" />
</RuleSet>
<RuleSet>
<Import ruleSet="MainRuleSet" />
</RuleSet>
</SyntaxDefinition>

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

@@ -259,6 +259,9 @@ public partial class App : Application
private void CheckUpdate()
{
if (SettingHelper.Get("DisableAutoUpdateCheck", false))
return;
if (DateTime.Now.Ticks - SettingHelper.Get<long>("LastUpdateTicks") < TimeSpan.FromDays(30).Ticks)
return;

View File

@@ -105,7 +105,7 @@
<PackageReference Include="WPF-UI.Violeta" Version="4.0.3.6">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Lib.Harmony" Version="2.4.1">
<PackageReference Include="Lib.Harmony" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="UnblockZoneIdentifier" Version="1.0.0">

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;

View File

@@ -5,7 +5,8 @@
<a href="https://trendshift.io/repositories/3258" target="_blank"><img src="https://trendshift.io/api/badge/repositories/3258" style="width: 250px; height: 55px;" width="250" height="55"/></a>
[![license](https://img.shields.io/github/license/QL-Win/QuickLook.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)
[![AppVeyor](https://img.shields.io/appveyor/ci/xupefei/QuickLook.svg)](https://ci.appveyor.com/project/xupefei/QuickLook)
[![Actions](https://github.com/QL-Win/QuickLook/actions/workflows/msbuild.yml/badge.svg)](https://github.com/QL-Win/QuickLook/actions/workflows/msbuild.yml)
[![Platform](https://img.shields.io/badge/platform-Windows-blue?logo=windowsxp&color=1E9BFA)](https://dotnet.microsoft.com/en-us/download/dotnet/latest/runtime)
[![Github All Releases](https://img.shields.io/github/downloads/QL-Win/QuickLook/total.svg)](https://github.com/QL-Win/QuickLook/releases)
[![GitHub release](https://img.shields.io/github/release/QL-Win/QuickLook.svg)](https://github.com/QL-Win/QuickLook/releases/latest)
@@ -36,7 +37,7 @@ Get it from one of the following sources:
* Microsoft Store (Windows 10 and later only). Not supported on Windows 10 S. Not support file preview in Open-File or Save-File dialogs. <a href="https://www.microsoft.com/store/apps/9nv4bs3l1h4s?ocid=badge" target="_blank"><img src="https://developer.microsoft.com/store/badges/images/English_get_L.png" height="22px" alt="Store Link" /></a>
* Installer or portable archive of the stable version from [GitHub Release](https://github.com/QL-Win/QuickLook/releases)
* Using [Scoop](https://scoop.sh/): `scoop bucket add extras && scoop install extras/quicklook`
* Nightly builds from [AppVeyor](https://ci.appveyor.com/project/xupefei/quicklook/build/artifacts) and [GitHub Action](https://github.com/QL-Win/QuickLook/releases/)
* Nightly builds from [GitHub Action](https://github.com/QL-Win/QuickLook/releases/)
[What are the differences between `.msi`, `.zip`, Nightly and Store versions?](https://github.com/QL-Win/QuickLook/wiki/Differences-Between-Distributions)