Development/Tutorials/Plasma4/ThemeDetails

From KDE TechBase
Revision as of 20:51, 4 March 2007 by Aseigo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

libplasma provides the Theme class so Plasma elements and other applications, such as KRunner, that need to graphically hint or theme interface elements. This is not a replacement for QStyle, but rather provides standard elements for things such as box backgrounds.

This allows for easy re-theming of the desktop while also keeping elements on the desktop more consistent with each other.

See also Plasma widgets.

Theme Storage

Still being finalized

Image Access

Theme elements are accessed by path. Whether this maps to literal paths on disk or not is not guaranteed and considered an implementation detail of Plasma::Theme.

Therefore, to access the dialog background, one might create an svg in this manner:

Plasma::Theme theme; QSvgRenderer svg( theme.image( "dialog/background" ); );

Reaction to Theme Changes

Still being finalized

Current Theme Elements

  • dialog/: elements for dialogs
    • background: the background image