manpagez: man pages & more
html files: gtk3
Home | html | info | man

Theming changes

In GTK+ 3.0, GtkStyleContext was added to replace GtkStyle and the theming infrastructure available in 2.x. GtkStyleContext is an object similar in spirit to GtkStyle, as it contains theming information, although in a more complete and tokenized fashion. There are two aspects to switching to GtkStyleContext: porting themes and theme engines, and porting applications, libraries and widgets.

Migrating themes

From GTK+ 3.0 on, theme engines must implement GtkThemingEngine and be installed in $libdir/gtk+-3.0/$GTK_VERSION/theming-engines, and the files containing style information must be written in the CSS-like format that is understood by GtkCssProvider. For a theme named "Clearlooks", the CSS file parsed by default is $datadir/themes/Clearlooks/gtk-3.0/gtk.css, with possible variants such as the dark theme being named gtk-dark.css in the same directory.

If your theme RC file was providing values for GtkSettings, you can install a settings.ini keyfile along with the gtk.css to provide theme-specific defaults for settings.

Key themes have been converted to CSS syntax too. See the GtkCssProvider documentation information about the syntax. GTK+ looks for key themes in the file $datadir/themes/theme/gtk-3.0/gtk-keys.css, where theme is the current key theme name.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.