HiDPI on Windows

I’m attempting to write an app that runs on both Linux and Windows. I also want to properly support HiDPI, but it appears that GTK defaults to being DPI unaware despite there being support for it in the codebase. Is there something I’m missing?

Which version of GTK do you use?

4.16, latest version from gvsbuild

I suppose that the result is that the UI elements appear too small.

One temporary solution would be to provide a configuration for the Scaling Factor, like provided in gnome-tweaks, but for Windows.

I suppose that the same GSettings key affect the size on Windows too. Try changing the default value of /org/gnome/desktop/interface/text-scaling-factor, to see if it fixes the problem.

Ideally an automatic configuration should be done, but in the meantime it is relatively easy to implement.