Ubuntu GNOME and high resolution screen: icons in QT apps are too small. How to solve?
Solution 1
Maybe you can play around with the QT_SCALE_FACTOR and QT_AUTO_SCREEN_SCALE_FACTOR environment variables.
I had the problem of a tiny UI font in calibre on the Gnome desktop on a 4K 15.6 display. I experimented with QT_SCALE_FACTOR=2.5 QT_AUTO_SCREEN_SCALE_FACTOR=0.8 calibre
in the terminal and it worked!
So, basically (if my guess is correct), QT_AUTO_SCREEN_SCALE_FACTOR controls the overall scaling except the font, while QT_SCALE_FACTOR controls font scaling only.
I also added these two variables to the desktop file of calibre:
before:
Exec=calibre --detach %F
after:
Exec=env QT_SCALE_FACTOR=2.5 QT_AUTO_SCREEN_SCALE_FACTOR=0.8 calibre --detach %F
Also you may want to take a look at this github issue.
Solution 2
The answer depends on which version of qt you are using, qt4
or qt5
. The following will tell you which version of qt you are using.
ldd $(which $NAME) | grep qt -i
For qt5
you can use an environment variable QT_SCALE_FACTOR
, for qt4
you can change font sizes using qtconfig-qt4
, but it would appear that icon sizes don't scale. You might, however, be able to use a different icon set, or if you are very energetic scale up another icon set yourself.
See https://wiki.archlinux.org/index.php/HiDPI for more details and details for other toolkits.
Related videos on Youtube
Giordano
Updated on September 18, 2022Comments
-
Giordano almost 2 years
my brother got a new laptop, a Thinkpad X1 Carbon 4th generation. It features a screen with a rather large resolution of 2560x1440 px.
Out of the box, GNOME scales well the size of the text and the icons, as you may see from this screenshot of LibreOffice:
Unfortunately QT apps seem not to behave the same, as seen in this screenshot of TexMaker:
As you may see the icons are too small and rather difficult to reach.
How can he uniform the look&feel of the QT apps to the one of the GTK apps? Is there some compatibility package that he has to install? Or some configuration to make?
Thanks in advance
-
SL5net over 3 years$ ldd $(which $NAME) | grep qt -i ldd: missing file arguments Try `ldd --help' for more information.
-
skeetastax over 3 yearsAlso
qmake --version
should show which one you have. I have 5.9.5 and have this issue on all apps that use Qt.