Qt5 based applications font is way too big

I am using couple of qt-based apps and the font appears way too big in them.

2019-02-14-142846_424x135_scrot
R-Studio Qt/5.4.0

2019-02-14-142952_276x444_scrot
Orange Qt/5

I have tried decreasing font via qtconfig-qt4 and qt5ct as well as some options available in these apps but nothing helps. The font does change but for config tool only. Smells like a Budgie issue (I use openbox wm in Manjaro Budgie).

Try using this, either in openbox config files or in file ~/.profile

export QT_QPA_PLATFORMTHEME="qt5ct"

there is also:

export QT_AUTO_SCREEN_SCALE_FACTOR=0

https://wiki.manjaro.org/index.php?title=Set_all_Qt_app's_to_use_GTK%2B_font_%26_theme_settings

I have set these both QT_QPA_PLATFORMTHEME and QT_AUTO_SCREEN_SCALE_FACTOR in ~/.profile before but it does not help as you can see :frowning:

Did you also select a smaller font size in qt5ct?

edit: Sorry, you mentioned this in the initial post.

Are there any output lines when starting QT5 apps?

Did you re-login after change?

Did you press “Apply”?

Yes, pressed apply of course, restarted pc. Nothing changed.
This never happened on Manjaro XFCE where I was also using openbox session.

Console output when I start qt5ct

qt5ct: using qt5ct plugin
Configuration path: "/home/pavel/.config/qt5ct"
Shared QSS paths: ("/home/pavel/.local/share/qt5ct/qss", "/usr/local/share/qt5ct/qss", "/usr/share/qt5ct/qss")
Shared color scheme paths: ("/home/pavel/.local/share/qt5ct/colors", "/usr/local/share/qt5ct/colors", "/usr/share/qt5ct/colors")

qt5ct.conf

[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=Chicago95-tux
standard_dialogs=default
style=gtk2

[Fonts]
fixed=@Variant(\0\0\0@\0\0\0 \0\x44\0\x65\0j\0\x61\0V\0u\0 \0S\0\x61\0n\0s\0 \0M\0o\0n\0o@ \0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\b\0S\0\x61\0n\0s@ \0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)

[Interface]
activate_item_on_single_click=1
buttonbox_layout=3
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=@Invalid()
menus_have_icons=false
stylesheets=/usr/share/qt5ct/qss/fusion-fixes.qss
toolbutton_style=4
underline_shortcut=0
wheel_scroll_lines=3

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xf9\0\0\0\xab\0\0\x6\xd9\0\0\x3\xc8\0\0\x3\xfa\0\0\0\xc3\0\0\x6\xd8\0\0\x3\xc4\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xfa\0\0\0\xc3\0\0\x6\xd8\0\0\x3\xc4)

I just tested your qt5ct.conf and can confirm that it works in Manjaro Xfce, so it seems to be something Openbox specific, indeed…

Openbox is responsible for the windows and borders, so I guess it is rather a configuration of Budgie/Qt5ct thing.
Actually I have the opposite issue, just now, on a new LxQt install. Borders and GTK apps have normal font, where widgets in the rest of apps are super tiny (on a 1920x1080 monitor)… :confounded:

Looks like a qt bug in GNOME https://unix.stackexchange.com/questions/450411/qt5-font-size-too-big-when-run-in-gnome-on-wayland
Should I try an earlier qt5 version?

Actually it is not a bug but an issue with non-free Nvidia drivers. As soon as I’ve installed non-free drivers some of my fonts became too little (Chromium tab titles, Thunar fonts) and some (qt based apps) became way too big like in the images I provided. The issue has been reported, described and solved: Nvidia proprietary driver UI scaling issue

Solution for lazy from issue 38204:
Modify your /etc/X11/mhwd.d/nvidia.conf

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Option "UseEdidDpi" "False"
        Option "DPI" "96x96"
    EndSubSection
EndSection
2 Likes

And was this something you had not noticed BEFORE you start the topic?..:exploding_head:

Yes, because I was using a Budgie DE where none of this happened even with non-free drivers otherwise I would have noticed it. However, once I started using Openbox my fonts became a mess. I tried to configure them via qtconfig4 and qt5ct but nothing worked and I wrongly assumed (from some semi-related github issue post) it is a bug caused by Gnome dependencies dragged with Budgie. I decided to test out another Manjaro ISO and reinstalled Budgie based system with Manjaro Openbox where fonts were just all right until I installed non-free drivers. That’s how I realized this is a different issue.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by