1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-04 17:34:07 +02:00

Fix wrong screenshot size when browser zoom is not 100%

This commit is contained in:
chylex 2018-04-06 03:05:06 +02:00
parent 44595bad40
commit 5a305a6740
2 changed files with 2 additions and 2 deletions
Core/Notification/Screenshot
Resources/Scripts

View File

@ -48,7 +48,7 @@ protected override string GetTweetHTML(TweetNotification tweet){
} }
private void SetScreenshotHeight(int height){ private void SetScreenshotHeight(int height){
SetNotificationSize(width, height); // TODO test how it works on high DPI, probably not great? SetNotificationSize(width, height);
} }
public void TakeScreenshot(){ public void TakeScreenshot(){

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 = window.outerWidth+"px"; ele.style.width = Math.floor(window.outerWidth/window.devicePixelRatio)+"px";
ele.style.position = "absolute"; ele.style.position = "absolute";
let contentHeight = ele.offsetHeight; let contentHeight = ele.offsetHeight;