]> git.sesse.net Git - pr0n/commitdiff
Fix infobox placement in edge cases on high-DPI screens.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 19 Mar 2023 23:04:18 +0000 (00:04 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 19 Mar 2023 23:04:18 +0000 (00:04 +0100)
files/pr0n-fullscreen.js

index a2480b4a3605030e8b81d04cd72f9dd2d995c53b..ecabed06e0e60a6dad8d1b2b48ee65dc785db935 100644 (file)
@@ -274,7 +274,7 @@ function position_image(img, backend_width, backend_height, offset, box)
        img.style.transform = "translate(" + extra_x_offset + "px,0px)";
 
        if (box) {
-               img.style.top = Math.min(top + height, screen_size[1] - 24) / dpr + "px";
+               img.style.top = Math.min(top + height, screen_size[1] - 24 * dpr) / dpr + "px";
                img.style.height = "24px";
                img.style.width = null;
                img.style.whiteSpace = 'nowrap';