GTK3

From GnuCash
Revision as of 09:57, 4 April 2018 by Cicko (talk | contribs) (new section for themes, adding part of Geert's comments)
Jump to: navigation, search

With version 3.0, GnuCash has upgraded to the GTK3 library from GTK2.

Customization

As registered in bug 791823, there is no GTK theming tool available with GTK3 as opposed to GTK2. Due to the fact that GTK3 uses Cascading Style Sheets (CSS) for themes, this, however, is relatively easy to resolve by placing a CSS file at the correct location on your system.

The comprehensive GTK+ CSS Overview is available at Gnome Developer web site.

Note this custom theme will affect all gtk3 based applications on your system!

Configuration tools
Various Linux distributions provide custom tools for managing themes. There is a nice overview of graphical tools available, depending on the desktop environment at archlinux.

Sample GnuCash CSS file:

For extra info, you can also look at these low-level customizations:

Note that these contain the variables, as explained in the CSS customization overview, under Colors section.

To locate the UI elements for customization, you can use the GTK Inspector tool.

To customize the GnuCash theme, create and/or modify an existing Cascading Style Sheets (CSS) file at the right location. The location of this file on different operating systems is explained in the following FAQ answer: Where can I find the GTK resource file? Note that, by default, no gtk-3.0.css file will be created by GnuCash so you will probably have to create one manually. Then add the CSS rules or copy values from an existing theme. There are plenty of GTK3 theme resources caused by the fact that CSS is a widely-adopted standard for UI styling and many people are familiar with it.

Related wiki entries:

Themes

You can use predefined GTK3 themes.

Short summary:

  1. Download an appropriate gtk3 theme from www.gnome-look.org
  2. Install the theme in a directory where gtk3 looks for themes
  3. create or adjust a settings.ini file to tell gtk3 to use this theme

Some sites where you can browse custom GTK3 themes:

Dark Theme

Here is an example of a dark theme for GnuCash 3. Note that this is still a work in progress, though.

Due to the lack of a dark theme on Windows, the guide would be the Adwaita Dark custom theme.