Development/Tutorials/Plasma4/ThemeDetails: Difference between revisions

    From KDE TechBase
    Line 22: Line 22:


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

    Revision as of 22:50, 7 March 2007

    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