User:Mxttie

From KDE Community Wiki
Revision as of 23:50, 3 August 2010 by Mxttie (talk | contribs) (Adding custom SVG content to your plasmoid)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Developing my first plasmoid

Adding custom SVG content to your plasmoid

Normally, relative paths are used to point to items from the current desktop theme. When you have custom content that's not part of any theme yet, you can supply it with your plasmoid by installing it in the default desktop theme.

In Cmake language this translates to:

install(FILES "analog_telemeter.svgz" DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/widgets/ )


I discovered this by looking at the cmake files of desktop themes. Desktop themes are found in KDE/kdeartwork/desktopthemes , except for oxygen, which can be found at KDE/kdebase/runtime/desktoptheme/oxygen. DATA_INSTALL_DIR translates for example to /usr/share/kde4/apps.

A desktop theme can support your plasmoid by supplying a file with the same name. If it is not found, there is a fallback to the default theme.