Improve QuickLook initialization speed

This commit is contained in:
ema
2025-07-05 02:46:00 +08:00
parent 913474f7ad
commit 267b37c526
2 changed files with 5 additions and 7 deletions

View File

@@ -15,9 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using ICSharpCode.AvalonEdit;
using QuickLook.Common.Plugin;
using QuickLook.Plugin.TextViewer.Themes;
using System;
using System.Collections.Generic;
using System.IO;
@@ -35,11 +33,6 @@ public class Plugin : IViewer
public void Init()
{
// pre-load
var _ = new TextEditor();
HighlightingThemeManager.Initialize();
// Implementation of the Search Panel Styled with Fluent Theme
{
var groupDictionary = new ResourceDictionary();

View File

@@ -40,6 +40,11 @@ public partial class TextViewerPanel : TextEditor, IDisposable
{
private bool _disposed;
static TextViewerPanel()
{
HighlightingThemeManager.Initialize();
}
public TextViewerPanel()
{
FontSize = 14;