How I got GTK and Qt to look consistant on my Linux desktop
The first step for a uniform look across GTK and Qt is to find a theme that has both a GTK and Qt version. Sadly there doesn't seem to be many, due to the high amount of upkeep required to maintain both versions.
The only two that have parallel versions are the default GNOME theme (Adwaita) or the default KDE Plasma theme (Breeze).
I decided on the Plasma theme. In order to get the full theme installed I needed to install the following packages in Arch Linux:
sudo pacman -S breeze breeze-gtk breeze-icons
Lets start by setting the GTK theme.
Some desktop environments provide a way to change this in their settings. GNOME users should use the tweak tool. Users of window managers should use the excellent
lxappearance to set GTK themes.
Upon setting your theme/icons, LXAppearance will generate the following config files:
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
GNOME/GTK, loving to do their own things, have appeared to switch the method in which GTK3 themes are set. GTK applications ignored the GTK3 config file, and I found that
gsettings must be used to set it:
gsettings set org.gnome.desktop.interface gtk-theme Breeze
gsettings set org.gnome.desktop.interface icon-theme breeze
Now that GTK is set we will look at Qt.
If you are not using KDE Plasma, Qt will force the (rather ugly) "Fusion" theme by default, this can be overridden by the following environment variable:
Now you just need to find a way to set this automatically on each login. Here is where that command should be copied to depending on what you use:
- Display manager with systemd:
- Starting DE/WM from tty:
~/.bash_profileor the profile of which ever shell you've set by default.
- X.org window managers:
But the Arch wiki has a pretty good page about it.
Well I hope everyone found this guide useful, I got most of this info from the Arch Wiki page "Uniform look for Qt and GTK applications".
I would recommend reading it if anyone is interested in possible alternatives. The article lists alternate theme engines which can help mimic popular GTK themes if you're interested.
I noticed that the text on inactive Firefox tabs was a bit difficult to read with breeze-gtk. According to the bug tracker this seems to be FF's fault, and there is a bug opened. You can get around this by enabling the title bar in FF's Customise menu.
This exposes the fun of GUI toolkits. Most software is only ever designed with the default theme in mind, and will cause plenty of unintended behaviour. That is the reality of complicated software.