glydget

Style

class Style

Bases: object

A Style describes the appearance of a glydget.widget.Widget for each of its possible state.

Properties

Style.font_name Font family name.
Style.font_size Font size, in points.
Style.bold Font boldness.
Style.italic Font slant.
Style.padding Padding.
Style.colors Text colors
Style.foreground_colors Foreground colors
Style.background_colors Background colors

Properties Details

Style.font_name

Font family name.

Type:str or list
Style.font_size

Font size, in points.

Type:float
Style.bold

Font boldness.

Type:bool
Style.italic

Font slant.

Type:bool
Style.padding

Padding.

Padding defines the space between widget up, down, left, right borders and widget contents.

Type:[int,int,int,int]
Style.colors

Text colors

A text color corresponds to a list of RGBA components in between 0 and 255. Since a widget can have several states, such a list must be specified for each of the different states (currently, 5).

Type:[[int,]*4]*5 (see explanations above).
Style.foreground_colors

Foreground colors

Any widget foreground is made of an outlined rectangle where line colors can be specified independently. A foreground color is then actually made of 8 RGBA colors specifying the top line (left and right colors), bottom line (left and right colors), right line (top and bottom colors) and left line (top and bottom colors). These components must be given as a flat list of 8x4 integers representing 8 RGBA components between 0 and 255. Furthermore and since a widget can have several states, such a list must be specified for each of the different states (currently, 5).

Type:[[int,]*4*8,]*5 (see explanations above).
Style.background_colors

Background colors

Any widget background is made of a filled rectangle where corner colors can be specified independently. A background color is then actually made of 4 RGBA colors specifying the top-left, top-right, bottom-left and bottom-right corners. These components must be given as a flat list of 4x4 integers representing 4 RGBA components between 0 and 255. Furthermore and since a widget can have several states, such a list must be specified for each of the different states (currently, 5).

Type:[[int,]*4*4,]*5 (see explanations above).