Development/Tutorials/Plasma4/ThemeDetails
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
- widget/: elements for desktop widgets
- colorball: a colored ball
- background: the background image
- header_background: a background image with a header.
- element ids: "header" is the area the header should be drawn into