From: Steinar H. Gunderson Date: Sun, 19 Mar 2023 23:04:18 +0000 (+0100) Subject: Fix infobox placement in edge cases on high-DPI screens. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=7f954ef5ec86c9ab790a89a9c153190bedfea54c Fix infobox placement in edge cases on high-DPI screens. --- diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index a2480b4..ecabed0 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -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';