use helper call

This commit is contained in:
Paddy Xu
2018-11-07 20:32:47 +02:00
parent ea0032f3df
commit ea55fda70a

View File

@@ -15,12 +15,9 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Threading; using System.Windows.Threading;
using QuickLook.Common.Helpers; using QuickLook.Common.Helpers;
@@ -30,8 +27,7 @@ namespace QuickLook.Plugin.HtmlViewer
{ {
public WebpagePanel() public WebpagePanel()
{ {
var factor = VisualTreeHelper.GetDpi(this); Zoom = (int)(100 * DpiHelper.GetCurrentScaleFactor().Vertical);
Zoom = (int)(factor.DpiScaleX*100);
} }
// adjust zoom when DPI changes. // adjust zoom when DPI changes.