UI elements too small on 4k

MusicBrainz Picard version: 2.9.2
OS: Linux Arch (EndeavourOS)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.1.54-1-lts (64-bit)
Graphics Platform: X11 (KDE Plasma may go full blown Wayland soon with v 6)

I am having trouble seeing the small fonts and tiny Icons in MBP on my 4k monitor. :cry: I canā€™t find any size settings in the options. I read a post here about it being too big, and some way to reduce it, but although the solution was given, it was rather vague as to where to make the changes (Something about QT display size), and it sounds to me the solution was to raise the UI size in QT5, so all QT5 apps.

:thinking:I donā€™t want to change the whole screen resolution, nor the UI elements in QT in general though, because many apps I use are at an agreeable size, and I donā€™t want them too big.

Would be nice if there were per app settings or if the program were resolution aware, given that so many people are using 4k monitors, and Iā€™m sure they are just going to get even higher in the near future.

Otherwise I love MBP, :smiling_face_with_three_hearts:what a great program! :+1: :+1: :+1:

3 Likes

Many Linux desktop environments have settings for screen scaling. E.g. KDE plasma has this under System Settings > Display and Monitor > Display Configuration > Global Scale. Qt5 is then supposed to pick up those settings.

If this does not get picked up try setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR=1. If this does not give proper results you can set a global scale factor with QT_SCALE_FACTOR or per-screen with QT_SCREEN_SCALE_FACTORS.

As far as I can tell in Qt5 the global QT_SCALE_FACTOR does not allow specifying fractional scaling, but QT_SCREEN_SCALE_FACTORS does. E.g. starting Picard with:

QT_SCREEN_SCALE_FACTORS=1.5 picard

on a system with a single screen will have the UI scaled 1.5 times. If you have more than one screen you can specify different scaling factors, e.g. QT_SCREEN_SCALE_FACTORS="1.5;2".

Scaling factors configured in the system + setting the environment variables can result in odd results, so you probably have to experiment a bit. The Arch wiki recommends to turn off QT_AUTO_SCREEN_SCALE_FACTOR if setting the scale factor manually via the environment variables to avoid issues.

Also check if any of those variables are already globally set on your system. If they are try to unset them. Maybe the default settings work better overall.

For details see the Qt documentation for High DPI Displays and the Arch wiki entry for HiDPI.

5 Likes

In the launcher for Picard I have under Command-Line Arguments a %F. Do I replace it with:

QT_AUTO_SCREEN_SCALE_FACTOR=1.5 picard

Or do I prepend or append it to The %F? As I stated I donā€™t want to change the global scaling and mess up a bunch of other apps.

In the .desktop file setting the Exec line to something like:

Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=1.5 picard %F

Adjust the scaling to your needs.

The %F gets replaced with a list of file paths in case of opening files with Picard.

1 Like

Aha!!

Thanks once again Outsidecontext, but insidbrainz! :hugs:

1 Like

Well, that didnā€™t work. I also tried to put the
Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=1.5 picard Under ā€œEnvironment variablesā€, but it didnā€™t work, nor at 1.5, 2 either.

Here are the original Desktop file contents (As installed but sans the irrelevant lines):

[Desktop Action new-window]
Exec=picard --stand-alone-instance %F
Name=New Window
[Desktop Entry]
Actions=new-window;
Exec=picard %F
NoDisplay=false
Path=
StartupNotify=true
StartupWMClass=Picard
Terminal=false
TerminalOptions=
X-KDE-Username=

Does it generally work with that environment variable when launching from terminal (just to confirm we are setting the right environment).

Also for updated .desktop file I donā€™t know how well Plasma reacts to changes. If in doubt try logging out and in again.

Just tried in terminal, but no change.

Can you check with env | grep QT_ which Qt environment variables are set?

I get QT_AUTO_SCREEN_SCALE_FACTOR=0 and am using 2monitors one at 1080 p and the other at 4k.

Sorry, I just noticed that I pasted the wrong variable name into the commands in my initial posts. The proper variable to set scaling factors for separate monitors is QT_SCREEN_SCALE_FACTORS.

So in case of 2 monitors you should try the following two commands:

QT_SCREEN_SCALE_FACTORS="1;2" picard

Check the Picard window on both monitors. If it is scaled up on the 4k monitor then you can now adjust the 2 and set a factor that suits your taste.

If it is scaled up on the 1080p monitor then turn around the factors:

QT_SCREEN_SCALE_FACTORS="2;1" picard

Also if you have currently QT_AUTO_SCREEN_SCALE_FACTOR=0 set you could alternatively try how things behave if you start Picard with:

QT_AUTO_SCREEN_SCALE_FACTOR=1 picard

This turns on Qt setting the scale factor automatically. If this works and follows the scaling factors you have configured per monitor in KDEā€™s settings that would maybe be the preferable solution, as you donā€™t need to deal with monitor order.

2 Likes

YESSSSSSSSSSSS!! You got it!

Now it works for the toolbar Icons, but the icons and fonts in the panes are still small (No change).

3 Likes

Indeed, if I try it on KDE Plasma the QT_SCREEN_SCALE_FACTORS only partially scales. Under GNOME the same setting scales everything. But for me scaling works properly if I configure scaling in KDE settings globally.

Also under KDE if I use QT_SCALE_FACTOR instead it scales everything, and works even with fractional scaling (which doesnā€™t work on GNOME with this variable):

QT_SCALE_FACTOR=1.5 picard
2 Likes