1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-29 11:34:13 +02:00

Fix screenshots to work properly with combinations of DPI and zoom settings

This commit is contained in:
chylex 2018-04-06 07:28:57 +02:00
parent 5a305a6740
commit 21e64a18d8
2 changed files with 2 additions and 2 deletions
Core/Notification/Screenshot
Resources/Scripts

View File

@ -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)); 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){ protected override string GetTweetHTML(TweetNotification tweet){

View File

@ -1,6 +1,6 @@
(function($TD){ (function($TD){
let ele = document.getElementsByTagName("article")[0]; 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"; ele.style.position = "absolute";
let contentHeight = ele.offsetHeight; let contentHeight = ele.offsetHeight;