Inglonias/VGraph

Program displays incorrectly when Windows Screen scaling is not 100%

Closed this issue · 7 comments

Hi,

I've noticed that when running the program in 3840x2160 resolution, the program displays like this:

image

The only fix I've found for this is to run the program in a lower resolution using Windows high DPI settings.

I unfortunately do not have a 4k screen to reproduce this issue.

What happens if you try creating a new page with more squares? That should force the main window to redraw and, perhaps, behave correctly?

I have reproduced this issue by having my video card pretend to be driving a 4K monitor to Windows. Yeah, this is weird. I dunno what's happening here. I will investigate.

Gotta love 4K screens. VGraph isn't the only program I've had display issues with.
It's not a huge problem since I can just reduce the resolution, it's just a little annoying.

It's not just 4K screens that causes the issue. I was able to reproduce the issue when I activated Windows scaling at any resolution.

I've discovered the root cause of the issue. SkiaSharp and windows don't talk to each other regarding what the current screen scaling is. If you were to reduce your scaling factor to 100%, this program would work just fine on a 4K monitor, but everything would be really tiny and hard to interact with.

The good news is, this appears to be fixable. I just need to find all the places that report the current cursor position and multiply it by the current windows scaling factor.

Fixed in the most recent release: 1.10.2 (https://github.com/Inglonias/VGraph/releases/tag/V1.10.2). Re-open this issue if there are any problems, and thanks for reporting the bug!

Working properly on my end. Thanks!