Theming changes: CTK+ 3 Reference Manual

## Theming changes

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

## Migrating themes

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

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

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