Introduction to KDE widget themes

At the very basic level KDE widget themes and styles are accomplished by allowing programmers to reimplement how widgets are painted as well as some user interaction parameters. When the developer makes a complete set of routines to draw all of the widgets this is called a "style". Examples of widget styles in KDE are Platinum, CDE, Windows, Motif, KStep, and Pillbox.

In KDE, one of these styles can read a configuration file to determine how widgets should be drawn. This configuration file is called a "theme", and is what most of this tutorial focuses on. Examples of widget themes in KDE include System and Marble.

Feature overview

Theme configuration file layout

The default theme plugin reads configuration files stored in the standard KDE configuration file format. These files are organized as a group name enclosed in brackets [], followed by several keys to set parameters for that group. For example:
[PushButton]
Border=2

This sets the the Border value to 2 for the PushButton group. You will find all widgets are configured in a similar manner.

The theme configuration files read by KDE can be stored in ~/.kde/share/apps/kstyle/themes and the global share/apps/kstyle/themes. They should all end in the extension .themerc.

The pixmaps used by KDE can be stored in ~/.kde/share/apps/kstyle/pixmaps and the global share/apps/kstyle/pixmaps. The standard format for pixmaps are PNG.

Some tools you might be interested in

In addition to the obvious KDE tools (KIconEdit, KView, etc...) that will be useful to you as you create themes there are some less obvious KDE and non-KDE utilities you may be interested in. Here is a brief list:

<< Previous Page | Next Page >>

Mail Mosfet