< Development‎ | Tutorials‎ | Plasma4
Revision as of 22:50, 7 March 2007 by (talk | contribs) (Current Theme Elements)
Jump to: navigation, search

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

  • /background: background images
    • /dialog: generic dialog background
    • /widget: generic desktop widget background
    • /shutdowndlg: shutdown dialog background
  • /widget: elements for desktop widgets
    • /colorball: a colored ball
    • /header_background: a background image with a header.
      • element ids: "header" is the area the header should be drawn into

Content is available under Creative Commons License SA 4.0 unless otherwise noted.