From 21e64a18d8884927eba978b9f180ab3f01bf2f29 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Fri, 6 Apr 2018 07:28:57 +0200
Subject: [PATCH] Fix screenshots to work properly with combinations of DPI and
 zoom settings

---
 Core/Notification/Screenshot/FormNotificationScreenshotable.cs | 2 +-
 Resources/Scripts/screenshot.js                                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Core/Notification/Screenshot/FormNotificationScreenshotable.cs b/Core/Notification/Screenshot/FormNotificationScreenshotable.cs
index d86f2dcc..f58fefa1 100644
--- a/Core/Notification/Screenshot/FormNotificationScreenshotable.cs
+++ b/Core/Notification/Screenshot/FormNotificationScreenshotable.cs
@@ -34,7 +34,7 @@ public FormNotificationScreenshotable(Action callback, FormBrowser owner, Plugin
             };
             
             LoadTweet(new TweetNotification(string.Empty, string.Empty, string.Empty, html, 0, string.Empty, string.Empty));
-            SetScreenshotHeight(0);
+            SetScreenshotHeight(1);
         }
         
         protected override string GetTweetHTML(TweetNotification tweet){
diff --git a/Resources/Scripts/screenshot.js b/Resources/Scripts/screenshot.js
index 9d6ea716..0f84f153 100644
--- a/Resources/Scripts/screenshot.js
+++ b/Resources/Scripts/screenshot.js
@@ -1,6 +1,6 @@
 (function($TD){
   let ele = document.getElementsByTagName("article")[0];
-  ele.style.width = Math.floor(window.outerWidth/window.devicePixelRatio)+"px";
+  ele.style.width = window.innerWidth+"px";
   
   ele.style.position = "absolute";
   let contentHeight = ele.offsetHeight;