Comment 28 for bug 1797308

Revision history for this message
John Beard (john-j-beard) wrote :

Ok, so this is kind of a WX thing, and kind of a KiCad thing.

Looks like we should be using GetContentScaleFactor() when computing the OpenGL scale factor.

However, even if we do this, it only works with WX >= 3.1 and GTK+ >= 3.10. Since WX 3.0.x is the current stable release, this means it basically doesn't work on any Linux distro. I have no idea about Windows, but I see no reference to a Windows implementation for this in the WX code.

As a stop-gap, I propose a patch like the attached, which provides a user-configurable way to set the scaling factor for OpenGL. This falls back to the WX method silently, so if the user is using a WX/GTK combo that works (i.e. after WX 3.2 is released), this option will not be needed, and by not setting it, the right thing will be done.

We could alternatively or additionally pick up the GDK_SCALE env var automatically, but I'm not sure if that's an easier method that an advanced config (also only works on GTK+, and probably isn't a default setting, as GDK is supposed to do that automagically?)

If we're anticipating a long period of supporting Hi-DPI on platforms without WX 3.2 (all the LTS distros, I guess) maybe this should be a full UI option?