Struct conrod::theme::Theme [] [src]

pub struct Theme {
    pub name: String,
    pub padding: Padding,
    pub x_position: Position,
    pub y_position: Position,
    pub background_color: Color,
    pub shape_color: Color,
    pub border_color: Color,
    pub border_width: Scalar,
    pub label_color: Color,
    pub font_id: Option<Id>,
    pub font_size_large: u32,
    pub font_size_medium: u32,
    pub font_size_small: u32,
    pub widget_styling: StyleMap,
    pub mouse_drag_threshold: Scalar,
    pub double_click_threshold: Duration,

A serializable collection of canvas and widget styling defaults.


A name for the theme used for identification.

Padding for Canvas layout and positioning.

A default widget position along the x axis.

A default widget position along the y axis.

A default background for the theme.

A default color for widget shapes.

A default color for widget borders.

A default width for widget borders.

A default color for widget labels.

The Id of the default font used for text widgets when one is not specified.

A default "large" font size.

A default "medium" font size.

A default "small" font size.

StyleMap for unique styling of each widget, index-able by the Widget::kind.

Mouse Drag distance threshold determines the minimum distance from the mouse-down point that the mouse must move before starting a drag operation.

Once the Duration that separates two consecutive Clicks is greater than this value, a DoubleClick event will no longer be generated.


impl Theme


The default theme if not loading from file.


Retrieve the unique default styling for a widget.

Attempts to cast the Box<WidgetStyle> to the Widget's unique associated style T.

Trait Implementations

Auto Trait Implementations

impl Send for Theme

impl !Sync for Theme