Difference between revisions of "GTK3"

From GnuCash
Jump to: navigation, search
(minor rewording, specifying Linux)
(new section for themes, adding part of Geert's comments)
Line 2: Line 2:
  
 
== Customization ==
 
== Customization ==
;Configuration tools: There is a nice overview of graphical tools available on Linux, depending on the desktop environment at [https://wiki.archlinux.org/index.php/GTK+#Configuration_tools archlinux].
 
  
As noted in [https://bugzilla.gnome.org/show_bug.cgi?id=791823 bug 791823], there is no GTK theming tool available for GTK3 on Windows. However, this is relatively easy to resolve manually by using a CSS file and placing it at the correct location.
+
As registered in [https://bugzilla.gnome.org/show_bug.cgi?id=791823 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 [https://developer.gnome.org/gtk3/stable/chap-css-overview.html GTK+ CSS Overview] is available at Gnome Developer web site.
 
The comprehensive [https://developer.gnome.org/gtk3/stable/chap-css-overview.html 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 [https://wiki.archlinux.org/index.php/GTK+#Configuration_tools archlinux].
  
 
Sample GnuCash CSS file:
 
Sample GnuCash CSS file:
Line 21: Line 24:
 
To locate the UI elements for customization, you can use the [https://wiki.gnome.org/Projects/GTK%2B/Inspector GTK Inspector] tool.
 
To locate the UI elements for customization, you can use the [https://wiki.gnome.org/Projects/GTK%2B/Inspector GTK Inspector] tool.
  
To customize the GnuCash theme, create and/or modify the Cascading Style Sheets (CSS) file. The location of this file is explained in the following entry: [https://wiki.gnucash.org/wiki/FAQ#Q:_Where_can_I_find_the_gtk_resource_file.3F Where can I find the GTK resource file?]
+
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: [https://wiki.gnucash.org/wiki/FAQ#Q:_Where_can_I_find_the_gtk_resource_file.3F Where can I find the GTK resource file?]
Note that, by default, no gtk-3.0.css file will be created so you have to create one manually. Then add the CSS rules or copy values from an existing theme.
+
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.
 
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.
  
Some GTK3 theme resource sites:
+
Related wiki entries:
 +
 
 +
* [https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F How do I change the register colors?]
 +
 
 +
=== Themes ===
  
* [https://www.gnome-look.org/browse/cat/135/ Gnome Look]
+
You can use predefined GTK3 themes.
* [https://www.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/whats-hot/ Devian Art]
 
  
etc.
+
Short summary:
 +
# Download an appropriate gtk3 theme from www.gnome-look.org
 +
# Install the theme in a directory where gtk3 looks for themes
 +
# create or adjust a settings.ini file to tell gtk3 to use this theme
  
Related wiki entries:
+
Some sites where you can browse custom GTK3 themes:
  
* [https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F How do I change the register colors?]
+
* [https://www.gnome-look.org/browse/cat/135/ Gnome Look]
 +
* [https://www.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/whats-hot/ Devian Art]
  
=== Dark Theme ===
+
==== Dark Theme ====
  
 
Here is an example of a dark theme for GnuCash 3. Note that this is still a work in progress, though.
 
Here is an example of a dark theme for GnuCash 3. Note that this is still a work in progress, though.

Revision as of 09:57, 4 April 2018

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.