mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-18 22:52:37 +00:00
Fix style changed from MediaInfoViewer
This commit is contained in:
@@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
using QuickLook.Common.Helpers;
|
using QuickLook.Common.Helpers;
|
||||||
using QuickLook.Common.Plugin;
|
using QuickLook.Common.Plugin;
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
@@ -32,22 +30,26 @@ public class TextViewerPanel : TextBox
|
|||||||
{
|
{
|
||||||
_ = context;
|
_ = context;
|
||||||
|
|
||||||
Margin = new Thickness(8, 0, 0, 0);
|
TextWrapping = TextWrapping.Wrap;
|
||||||
FontSize = 14;
|
VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||||
|
HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||||
|
Margin = new Thickness(8d, 0d, 0d, 0d);
|
||||||
|
BorderThickness = new Thickness(0d);
|
||||||
|
FontSize = 14d;
|
||||||
IsReadOnly = true;
|
IsReadOnly = true;
|
||||||
IsManipulationEnabled = true;
|
IsManipulationEnabled = true;
|
||||||
|
|
||||||
ContextMenu = new ContextMenu();
|
ContextMenu = new ContextMenu();
|
||||||
ContextMenu.Items.Add(new MenuItem
|
ContextMenu.Items.Add(new MenuItem
|
||||||
{
|
{
|
||||||
Header = TranslationHelper.Get("Editor_Copy", domain: Assembly.GetExecutingAssembly().GetName().Name),
|
Header = TranslationHelper.Get("Editor_Copy", domain: "QuickLook.Plugin.TextViewer"),
|
||||||
Command = ApplicationCommands.Copy
|
Command = ApplicationCommands.Copy,
|
||||||
});
|
});
|
||||||
ContextMenu.Items.Add(new MenuItem
|
ContextMenu.Items.Add(new MenuItem
|
||||||
{
|
{
|
||||||
Header = TranslationHelper.Get("Editor_SelectAll",
|
Header = TranslationHelper.Get("Editor_SelectAll",
|
||||||
domain: Assembly.GetExecutingAssembly().GetName().Name),
|
domain: "QuickLook.Plugin.TextViewer"),
|
||||||
Command = ApplicationCommands.SelectAll
|
Command = ApplicationCommands.SelectAll,
|
||||||
});
|
});
|
||||||
|
|
||||||
ManipulationInertiaStarting += Viewer_ManipulationInertiaStarting;
|
ManipulationInertiaStarting += Viewer_ManipulationInertiaStarting;
|
||||||
@@ -57,7 +59,7 @@ public class TextViewerPanel : TextBox
|
|||||||
PreviewMouseWheel += Viewer_MouseWheel;
|
PreviewMouseWheel += Viewer_MouseWheel;
|
||||||
|
|
||||||
FontFamily = new FontFamily("Consolas, " + TranslationHelper.Get("Editor_FontFamily",
|
FontFamily = new FontFamily("Consolas, " + TranslationHelper.Get("Editor_FontFamily",
|
||||||
domain: Assembly.GetExecutingAssembly().GetName().Name));
|
domain: "QuickLook.Plugin.TextViewer"));
|
||||||
|
|
||||||
LoadTextAsync(text);
|
LoadTextAsync(text);
|
||||||
}
|
}
|
||||||
@@ -67,7 +69,7 @@ public class TextViewerPanel : TextBox
|
|||||||
e.TranslationBehavior = new InertiaTranslationBehavior
|
e.TranslationBehavior = new InertiaTranslationBehavior
|
||||||
{
|
{
|
||||||
InitialVelocity = e.InitialVelocities.LinearVelocity,
|
InitialVelocity = e.InitialVelocities.LinearVelocity,
|
||||||
DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0)
|
DesiredDeceleration = 10d * 96d / (1000d * 1000d)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user