Jump to content

Plasma/Guidelines: Difference between revisions

From KDE Community Wiki
Line 15: Line 15:


=== Coding conventions ===
=== Coding conventions ===
Kdelibs coding conventions should be used
[http://techbase.kde.org/Policies/Kdelibs_Coding_Style Kdelibs coding] conventions should be used

Revision as of 20:45, 26 August 2010

Guidelines

The Plasma widgets should follow some simple guidelines in both style and code to be included in the official widget set for the KDE Plasma workspaces.

Graphics style

  • Applets should use the Plasma::Applet default background
  • Only widgets of the libplasma widget set should be used
  • If custom widgets are created, they should be styled with svgs from the Plasma theme, using Plasma::Svg and Plasma::FrameSvg
  • All text should always be painted using the colors from Plasma::Theme

Behavioural conventions

  • Applets should always work in any form factor, Planar, Horizontal and Vertical
  • Applets should be tested on all Containments provided in the standard distribution: Desktop, Panel, Newspaper, Search and launch, and Grouping Desktop
  • If an applet should look like an icon when it is in a panel (or if it should have a popup anyways) it should inherit Plasma::PopupApplet
  • Applets should do just strictly "visualization" related tasks, as much of the work as possible should be done with implementations of Plasma::DataEngine (data fetcing) and Plasma::Service (data writing)

Coding conventions

Kdelibs coding conventions should be used