Gtk app scaling

In an internal discussion with the team, a proposal, a way to do it, was via profiles. My honest concern about it is due to the inconsistency of it. A few issues i noticed in the past and mentioned previously got mostly fixed in KDE Plasma 5.27.4, but then i could reproduce the issue mentioned here on an older install after the update:

So the user already had it installed and working, and had to do all that uninstall/install again procedure.

On the other hand, i still noticed that, while setting now the scale in Display Configuration, values are modified simultaneously in the following files:
~/.config/xsettingsd/xsettingsd.conf the Gdk/UnscaledDPI is changed
~/.config/gtk-3.0/settings.ini the gtk-xft-dpi
~/.config/gtk-4.0/settings.ini the gtk-xft-dpi

I don’t quite understand why 3 files need to keep track of the same DPI settings, but let’s pretend it has to be that way. Is still better than previously when those files got out of sync really badly …

Currently my global scale is 100% so the value in question in all 3 files is 98304
I change it to 125% because otherwise i get
image
the values change to 122880 so, i switch back to 100% and … kaboom … the values do not change at all.
Changed to 200% applied and xsetingsd.conf has the 98304 value while the other two .ini files have the value 196608 … so i set to 150% and the .ini files still keep the 196608 and the xsetingsd.conf also gets that 196608 value.

Back to 125% xsettingsd.conf is 147456 (but wait, that is a different value i had previously when using the 125%) but at least now the .ini files also show that value …
I switch back to 100% and now the values are 122880 while should be 98304 because i’m back to where i started …

The GTK applications i had opened, not all got updated when applying, and some crashed during this process. So is not quite there yet …

KDE Plasma team is working on it tho Set DPI scaling settings for GTK on Plasma/X11 sessions (!49) · Merge requests · Plasma / KDE GTK Configurator · GitLab and probably in time will get even better.

On Wayland session things are more coherent in this regard.