From ea55fda70a2e3400d0110ed69bc512c346b4e132 Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Wed, 7 Nov 2018 20:32:47 +0200 Subject: [PATCH] use helper call --- .../QuickLook.Plugin.HtmlViewer/WebpagePanel.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebpagePanel.cs b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebpagePanel.cs index e60c373..3c8b6b1 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebpagePanel.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/WebpagePanel.cs @@ -15,12 +15,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -using System; using System.IO; using System.Text; using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; using System.Windows.Threading; using QuickLook.Common.Helpers; @@ -30,8 +27,7 @@ namespace QuickLook.Plugin.HtmlViewer { public WebpagePanel() { - var factor = VisualTreeHelper.GetDpi(this); - Zoom = (int)(factor.DpiScaleX*100); + Zoom = (int)(100 * DpiHelper.GetCurrentScaleFactor().Vertical); } // adjust zoom when DPI changes.