This commit is contained in:
Paddy Xu
2017-08-06 17:27:30 +03:00
parent 3a20245304
commit 5b97e7ef60
17 changed files with 243 additions and 23 deletions

View File

@@ -28,6 +28,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using QuickLook.Annotations;
using QuickLook.Helpers;
namespace QuickLook.Plugin.ImageViewer
{
@@ -51,6 +52,11 @@ namespace QuickLook.Plugin.ImageViewer
{
InitializeComponent();
var scale = DpiHelper.GetCurrentScaleFactor();
backgroundBrush.Viewport = new Rect(new Size(
backgroundBrush.ImageSource.Width / scale.Horizontal,
backgroundBrush.ImageSource.Height / scale.Vertical));
SizeChanged += ImagePanel_SizeChanged;
viewPanel.PreviewMouseWheel += ViewPanel_PreviewMouseWheel;