Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

Tutorial: Window Decoration Theme

Window Decorations

A title theme is positioned over the window title of maximised windows. If the window title size and the system title size do not match, some of the application window will be obscured, or there will be an empty area at the top of the application. Therefore it is essential that the window decoration metrics match the title theme.

The two window states available are:

In each state the following metrics are supported:

MetricDescription
TitleHeightThe height of the title
LeftBorderThe width of the left border
RightBorderThe width of the right border
TopBorderThe height of the top border (above the title)
BottomBorderThe height of the bottom border
CornerGrabSizeThe length of the region in each corner that can be used to resize the window

The following pixmaps may be supplied:

PixmapDescription
TitlePixmapThe pixmap to be drawn at the top of the window
OverlayPixmapDrawn over the top of the TitlePixmap. This allows an area of the title to be tinted a different color. An example of this is the highlight colored area in the portal theme.
LeftPixmapThe pixmap to be drawn to the left of the window
RightPixmapThe pixmap to be drawn to the right of the window
BottomPixmapThe pixmap to be drawn at the bottom of the window

For each pixmap the following properties may be set:

PropertyDescription
<Title|Overlay|Left|Right|Bottom>;OffsetsSpecifies the position of the tileable area of the image. For example, "TitleOffsets=16,48" says that the image to be used for the title should place the first 16 pixels at the left, the pixels from 48 on the right, and tile the pixels in between.
<Title|Overlay|Left|Right|Bottom>;ColorSpecifies the color to tint the image. May be a rgb color spec (#FFFFFF) or a Qt palette color name.

The following example illustrates the format of the decoration configuration file:

    [Decoration]
    Name = Portal
    Base = themes/portal

    [Maximized]
    TitleHeight = 34
    TitlePixmap = titlebg_0
    TitleOffsets = 87,88

    [Normal]
    TitleHeight = 19
    TitlePixmap = titlebox
    TitleOffsets = 8,56
    OverlayPixmap = titlebox_overlay
    OverlayOffsets = 16,48


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3