You are not logged in.

#1 2020-06-14 00:13:37

mjd119
Member
Registered: 2020-05-07
Posts: 119

[SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

I am having trouble configuring qt for the window manager i3. GTK appears to be fine, but qt is zoomed in more with the dolphin file browser on i3 when compared to KDE Plasma. The regular icons in the sidebar (with color like in the KDE Plasma Screenshot) do not show up until you zoom in further and the bar that shows free disk space is different. I switched to running i3 as a window manager instead of kwin in KDE Plasma, but this problem was present when I ran i3 by itself without the added settings to disable kwin in my i3 config.
This photo album shows the differences https://imgur.com/a/pg9xhPi when I run dolphin with different flags. I ran qt5ct and changed all the applicable settings to Breeze and I still have these issues. I configured GTK with lxappearance. Other qt-based apps have the similar theme issues
My ..xinitrc file is:

# Added by mjd119 (Arch Wiki)
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

.Xresources file is:

Xft.dpi: 160
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

I haven't edited any qt or GTK config files manually, but I can post any other config files if needed to figure out the issue. I have the font dpi in KDE Plasma at 160 and the Display Scaling is set to 175% if that is one part of the issue. I also installed qt5-styleplugins to see if I could solve the issue but it didn't make a difference. I just got more theme options. I am trying to get GTK and qt to behave the same. Running QT_STYLE_OVERRIDE="gtk2" dolphin gives me:

(dolphin:49298): Gtk-WARNING **: 20:03:36.339: Unable to locate theme engine in module_path: "adwaita",

even though I set the theme, icons, etc. to Breeze in KDE for GTK2 and GTK3. I also tried to add DE=KDE to my .xinitrc file and it made no difference. Running the QT_STYLE_OVERRIDE with different arguments yielded an application that also doesn't look very good, so I don't think the issue is this singular theme. Running transmission-qt with no flags defaults to the fallback qt theme. Am I missing something here?

Last edited by mjd119 (2020-06-19 14:07:35)

Offline

#2 2020-06-14 00:16:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

1. If that is your complete .xinitrc, it is lacking. See the xinit page.

2. https://wiki.archlinux.org/index.php/HiDPI#Qt_5


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-06-14 01:48:30

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

jasonwryan wrote:

1. If that is your complete .xinitrc, it is lacking. See the xinit page.

2. https://wiki.archlinux.org/index.php/HiDPI#Qt_5

Should the QT_SCREEN_SCALE_FACTORS value be equal to the scaling I set in the gui for KDE Plasma? Is scaling fonts necessary if I already set Xft.dpi?

Offline

#4 2020-06-14 02:33:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

Scaling attempts to match the DPI. You may need to play around with the values. Start with 1.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-06-14 02:42:41

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

I have tried this:

# Added by mjd119 (Arch Wiki)
# Added qt to scale qt apps for window manager
export QT_SCREEN_SCALE_FACTORS=1.75
export QT_AUTO_SCREEN_SCALE_FACTOR=0
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

and this:

# Added by mjd119 (Arch Wiki)
# Added qt to scale qt apps for window manager
export QT_SCREEN_SCALE_FACTORS=1.75
export QT_AUTO_SCREEN_SCALE_FACTOR=1.75
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

for my .xinitrc and I get the same result when I open dolphin. I wasn't sure whether the auto factor should be 0. That section on the Arch Wiki was a little confusing

Last edited by mjd119 (2020-06-14 02:42:56)

Offline

#6 2020-06-14 02:45:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

Environment variables should be set in your .profile or .bash_profile, or shell equivalent. If you are using a DM, set them in their respective config.

While you are trying to make it work, remove them all, and from a clean environment, start dolphin like so:

export QT_AUTO_SCREEN_SCALE_FACTOR=1 dolphin

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2020-06-14 03:04:10

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

jasonwryan wrote:

Environment variables should be set in your .profile or .bash_profile, or shell equivalent. If you are using a DM, set them in their respective config.

While you are trying to make it work, remove them all, and from a clean environment, start dolphin like so:

export QT_AUTO_SCREEN_SCALE_FACTOR=1 dolphin

Are you saying to put that line in the .profile file or the .bash_profile, or do you mean run that command in the terminal? When I run that with =1 or any other value and then open dolphin there doesn't appear to be any change. It's the same thing if I run that command without "export." Am I doing something wrong?

Offline

#8 2020-06-14 03:08:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

You remove all the variables from your xinitrc, and restart X, then run that command from a terminal. When you find the corect scale value (1 or 1.25, whatever), you add that line to your shell profile.

# edit: fuck me, this keyboard is on its way out...

Last edited by jasonwryan (2020-06-14 03:08:48)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2020-06-14 03:18:51

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

jasonwryan wrote:

You remove all the variables from your xinitrc, and restart X, then run that command from a terminal. When you find the corect scale value (1 or 1.25, whatever), you add that line to your shell profile.

# edit: fuck me, this keyboard is on its way out...

My .xinitrc is this.

# Added by mjd119 (Arch Wiki)
# Added qt to scale qt apps for window manager
# export QT_SCREEN_SCALE_FACTORS=1.75
# export QT_AUTO_SCREEN_SCALE_FACTOR=0
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

I restarted the desktop after I reset my .xinitrc file and ran your command (export QT_AUTO_SCREEN_SCALE_FACTOR=1 dolphin) and the command without "export" with differing numbers (1, 1.5, 10, etc.). Dolphin doesn't appear to look any different. I'm not sure what I'm doing wrong.

EDIT:
I ran the commands in bash and zsh (my default shell), but I don't think that matters anyway. How do I restart xserver?

Last edited by mjd119 (2020-06-14 03:22:51)

Offline

#10 2020-06-19 14:07:15

mjd119
Member
Registered: 2020-05-07
Posts: 119

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

I think I've figured it out. Since I'm using a display manager (SDDM) I need to put export the environment variables in .xprofile since SDDM doesn't read the .xinitrc file. I am still figuring out how the environment variables work, but I think I understand how they work. The icons are still look strange, but the theming everywhere else is fine. Marking this as solved.

Offline

#11 2020-06-19 18:46:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Configuring qt for i3 Window Manager (Larger Icons and Fonts)

jasonwryan wrote:

Environment variables should be set in your .profile or .bash_profile, or shell equivalent. If you are using a DM, set them in their respective config.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB