Talk:Uniform look for Qt and GTK applications

From ArchWiki
Jump to: navigation, search

Not sure if relevant

qt5ct

qt5ct is a package available in the AUR and support enabling GTK theme for QT5 applications. I've been using it for more than a year and It works like a charm, I'm surprised this page never mentionned it since it's the simplest solution I've ever found.

I have never contributed to the arch wiki and I'm too afraid to write bad information, so i'll just let this here.

Mentatf (talk) 20:43, 6 August 2015 (UTC)

It looks like a generic Qt configuration tool, so I think it would probably better to add it to the Qt page.--City-busz (talk) 00:01, 7 August 2015 (UTC)
Indeed, it provides exactly the same interface as qtconfig-qt4 for qt4 that is mentionned in the Qt page. Those 3 pages (Gtk, Qt and Gtk+Qt) are a bit confusing since they mention similar tools for very purposes. Shall I edit the Qt page then ? Mentatf (talk) 13:55, 7 August 2015 (UTC)

Weby (talk) 22:57 GMT+1, 5 september 2016

Discovered qt5ct today and it is the ONLY working option to theme QT5 applications as of right now... Other theme engines either have no effect or simply crash (segfault) the applications running Qt5. This one proved to be best tool, and I think it should be included in extra.
If the others options aren't working out for you, give this one a shot.

Obsolete section

This section was previously in the main page. It is no longer relevant, but there may be interesting information, so I've left it here in the meantime. Ostiensis (talk) 04:32, 12 April 2015 (UTC)

KDE Oxygen

Oxygen is a Qt style that comes by default with KDE Plasma 4. In other environments it can be installed with oxygen-kde4. There are various ways of mimicking its appearance that are described below.

oxygen-gtk

oxygen-gtk is a port of the Oxygen Qt Style to GTK+ done by the Oxygen developers. The style has GTK+ 2.x and GTK+ 3.x variants which can be installed with the oxygen-gtk2 or oxygen-gtk3[broken link: package not found] packages.

Note: Before KDE Plasma 4.10, you needed to create the file ~/.kde4/share/config/gtkrc-2.0, or do so automatically as described below. This is counter-productive with Plasma 4.10’s oxygen-gtk, and you should delete this file after upgrading to prevent it from messing with your colors. Cleanup-removal of ~/.kde4/share/config/gtkrc might be necessary, too.
Automatic procedure

A few dedicated applications are available in the official repositories that are able to change the GTK+ theme.

You can also install kde-gtk-config. After installation, it can be found in System Settings > Application Appearance > GTK Configuration. It allows you to configure the look and feel for both GTK+ 2.x and GTK+ 3.x applications and is integrated with the KDE add-on installer (Get Hot New Stuff), so you can also download and install other GTK+ themes.

Oxygen icons

If you are using Oxygen icons and want a consistent look in GTK+ dialogs, you can install the oxygenrefit2-icon-themeAUR icon theme from AUR and set it as your GTK+ icon theme. To apply the theme you can use lxappearance (or a similar program) or set it manually by adding the following line to ~/.kde4/share/config/gtkrc-2.0:

gtk-icon-theme-name="OxygenRefit2"

Another version of the Oxygen icon theme for GTK+ applications can be installed with the oxygen-gtk-iconsAUR package from AUR.

Obsolete section 2

The GTK+-Qt engine is unmaintained, and won't support GTK+ 3 too, so I removed it. --City-busz (talk) 12:16, 1 July 2015 (UTC)

GTK+-Qt engine

Warning:
  • There are rendering issues with some Qt styles.
  • There is no support for GTK+ 3.

This engine applies all Qt settings (styles, fonts, but not icons) to GTK+ applications, using style plugins directly. It can be installed with gtk-qt-engineAUR from the AUR.

You can access it from the KDE System Settings under Lost and Found > GTK Styles and Fonts or with kcmshell4 kde-gtk-config.

To remove the engine, uninstall the package and delete the following files:

$ rm ~/.gtkrc2.0-kde
$ rm ~/.kde4/env/gtk-qt-engine.rc.sh
$ rm ~/gtk-qt-engine.rc

Obsolete section 3

QtCurve does not support GTK+ 3 either, so I removed it. --City-busz (talk) 13:54, 1 July 2015 (UTC)

QtCurve

QtCurve is a highly popular and configurable set of widget styles for GTK+ 2.x, Qt4, Qt5 and KDE4. QtCurve can be installed with the packages from qtcurveAUR group, available in the official repositories. It has many controls for various options, ranging from the appearance of buttons to the shape of sliders.

To manually change the GTK+ theme to QtCurve, you need to create the file ~/.gtkrc-2.0-kde4 with the following content:

include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"
include "/etc/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Sans Serif"
}
widget_class "*" style "user-font" 
gtk-theme-name="QtCurve"

Then you need to create the symbolic link ~/.gtkrc-2.0:

ln -s .gtkrc-2.0-kde4 .gtkrc-2.0

If you want also specify a font, you can add (and adapt) the following line to the file:

 gtk-font-name="Sans Serif 9"

Not sure if relevant

qt5ct

qt5ct is a package available in the AUR and support enabling GTK theme for QT5 applications. I've been using it for more than a year and It works like a charm, I'm surprised this page never mentionned it since it's the simplest solution I've ever found.

I have never contributed to the arch wiki and I'm too afraid to write bad information, so i'll just let this here.

Mentatf (talk) 20:43, 6 August 2015 (UTC)

It looks like a generic Qt configuration tool, so I think it would probably better to add it to the Qt page.--City-busz (talk) 00:01, 7 August 2015 (UTC)
Indeed, it provides exactly the same interface as qtconfig-qt4 for qt4 that is mentionned in the Qt page. Those 3 pages (Gtk, Qt and Gtk+Qt) are a bit confusing since they mention similar tools for very purposes. Shall I edit the Qt page then ? Mentatf (talk) 13:55, 7 August 2015 (UTC)

Weby (talk) 22:57 GMT+1, 5 september 2016

Discovered qt5ct today and it is the ONLY working option to theme QT5 applications as of right now... Other theme engines either have no effect or simply crash (segfault) the applications running Qt5. This one proved to be best tool, and I think it should be included in extra.
If the others options aren't working out for you, give this one a shot.

Obsolete section

This section was previously in the main page. It is no longer relevant, but there may be interesting information, so I've left it here in the meantime. Ostiensis (talk) 04:32, 12 April 2015 (UTC)

KDE Oxygen

Oxygen is a Qt style that comes by default with KDE Plasma 4. In other environments it can be installed with oxygen-kde4. There are various ways of mimicking its appearance that are described below.

oxygen-gtk

oxygen-gtk is a port of the Oxygen Qt Style to GTK+ done by the Oxygen developers. The style has GTK+ 2.x and GTK+ 3.x variants which can be installed with the oxygen-gtk2 or oxygen-gtk3[broken link: package not found] packages.

Note: Before KDE Plasma 4.10, you needed to create the file ~/.kde4/share/config/gtkrc-2.0, or do so automatically as described below. This is counter-productive with Plasma 4.10’s oxygen-gtk, and you should delete this file after upgrading to prevent it from messing with your colors. Cleanup-removal of ~/.kde4/share/config/gtkrc might be necessary, too.
Automatic procedure

A few dedicated applications are available in the official repositories that are able to change the GTK+ theme.

You can also install kde-gtk-config. After installation, it can be found in System Settings > Application Appearance > GTK Configuration. It allows you to configure the look and feel for both GTK+ 2.x and GTK+ 3.x applications and is integrated with the KDE add-on installer (Get Hot New Stuff), so you can also download and install other GTK+ themes.

Oxygen icons

If you are using Oxygen icons and want a consistent look in GTK+ dialogs, you can install the oxygenrefit2-icon-themeAUR icon theme from AUR and set it as your GTK+ icon theme. To apply the theme you can use lxappearance (or a similar program) or set it manually by adding the following line to ~/.kde4/share/config/gtkrc-2.0:

gtk-icon-theme-name="OxygenRefit2"

Another version of the Oxygen icon theme for GTK+ applications can be installed with the oxygen-gtk-iconsAUR package from AUR.

Obsolete section 2

The GTK+-Qt engine is unmaintained, and won't support GTK+ 3 too, so I removed it. --City-busz (talk) 12:16, 1 July 2015 (UTC)

GTK+-Qt engine

Warning:
  • There are rendering issues with some Qt styles.
  • There is no support for GTK+ 3.

This engine applies all Qt settings (styles, fonts, but not icons) to GTK+ applications, using style plugins directly. It can be installed with gtk-qt-engineAUR from the AUR.

You can access it from the KDE System Settings under Lost and Found > GTK Styles and Fonts or with kcmshell4 kde-gtk-config.

To remove the engine, uninstall the package and delete the following files:

$ rm ~/.gtkrc2.0-kde
$ rm ~/.kde4/env/gtk-qt-engine.rc.sh
$ rm ~/gtk-qt-engine.rc

Obsolete section 3

QtCurve does not support GTK+ 3 either, so I removed it. --City-busz (talk) 13:54, 1 July 2015 (UTC)

QtCurve

QtCurve is a highly popular and configurable set of widget styles for GTK+ 2.x, Qt4, Qt5 and KDE4. QtCurve can be installed with the packages from qtcurveAUR group, available in the official repositories. It has many controls for various options, ranging from the appearance of buttons to the shape of sliders.

To manually change the GTK+ theme to QtCurve, you need to create the file ~/.gtkrc-2.0-kde4 with the following content:

include "/usr/share/themes/QtCurve/gtk-2.0/gtkrc"
include "/etc/gtk-2.0/gtkrc"

style "user-font"
{
    font_name="Sans Serif"
}
widget_class "*" style "user-font" 
gtk-theme-name="QtCurve"

Then you need to create the symbolic link ~/.gtkrc-2.0:

ln -s .gtkrc-2.0-kde4 .gtkrc-2.0

If you want also specify a font, you can add (and adapt) the following line to the file:

 gtk-font-name="Sans Serif 9"


Re-adding Qt+GTK2 only styles?

I believe the sections on the Oxygen and QtCurve styles were removed prematurely. Yes, they don't support GTK3, but many (most?) GTK applications outside of the Gnome project are still using GTK2. This includes the current versions of Gimp and Inkscape as shipped by Arch Linux. So for many users, those styles *do* still provide a uniform look for all their Qt and GTK applications. That isn't true for Gnome users, of course, but it is for many KDE users who will only install a handful of GTK apps. Therefore, I think including the information on the page with a note about its limitations, is better than removing it altogether. --Smls (talk) 07:54, 18 June 2017 (UTC)

GTK2 is the past. More and more applications will switch to GTK3. I think when we speak about uniform look, we should mention solutions only which support at least the latest releases of the two most popular toolkits: GTK3 and Qt5. --City-busz (talk) 17:48, 18 June 2017 (UTC)
Well, as I explained, GTK2 is also still the present outside of the Gnome project. I'm not saying it should be, and it won't always be, but factually, right now, it is. (And was even more so in 2015 when the information in question was removed from the article).
I think that if a solution unifies the look of all the Qt and GTK+ applications that a non-neglible set of users with an up-to-date (!) Arch Linux will have installed, then an article called "Uniform look for Qt and GTK applications" should mention it.
The wiki is most useful when it pragmatically helps users with the their Arch Linux systems as they actually exist, rather than redact information based on overzealous purism/idealism and expectations of what "more and more applications will" do in the future. --Smls (talk) 16:11, 19 June 2017 (UTC)