League-of-Foundry-Developers / fvtt-module-theatre

GNU General Public License v3.0
30 stars 39 forks source link

Support higher pixel densities via core pixel ratio scaling setting #157

Closed JulieWinchester closed 9 months ago

JulieWinchester commented 9 months ago

This is a single-line PR that adds support for higher pixel densities (for retina displays, etc.) if the user has enabled the core Foundry setting "Pixel Ratio Resolution Scaling." It allows Theatre Inserts images to match the pixel density of the rest of the Foundry canvas, which avoids situations where on retina displays theatre images can be noticeably blurry compared to canvas graphics when using high-resolution actor images.

megahead11 commented 9 months ago

Kind of an interesting PR, as I had never considered retina display scaling. How much does it typically differ? I do not have a way to test this PR as I do not have a retina display available (or similar), so I definitely need your confirmation that it works.

JulieWinchester commented 9 months ago

The difference can be pretty significant in some cases. I'll paste before and after screenshots, hopefully GitHub retains enough of the resolution for it to be noticeable (edit: yep, detail retained, it helps to open the images in new tabs and compare though). I've zoomed way into the canvas to show detail on the token, which is high pixel density in both screenshots. In the first the insert is low pixel density (resolution 1 on a high-dpi screen) and in the second the insert is high pixel density (resolution 2). I will say I don't have a Windows PC to test this out on a high-dpi monitor there, I'm only able to test in MacOS.

Before (master branch)

Screenshot 2023-11-12 at 11 15 24 PM

After (PR branch)

Screenshot 2023-11-12 at 11 14 37 PM
megahead11 commented 9 months ago

I'll go ahead and merge this then :) It can't hurt either way. That looks pretty good!