Struct conrod::Theme [−] [src]

pub struct Theme {
    pub name: String,
    pub padding: Padding,
    pub margin: Margin,
    pub position: Position,
    pub align: Align,
    pub background_color: Color,
    pub shape_color: Color,
    pub frame_color: Color,
    pub frame_width: f64,
    pub label_color: Color,
    pub font_size_large: u32,
    pub font_size_medium: u32,
    pub font_size_small: u32,
    pub maybe_canvas_split: Option<Style>,
    pub maybe_button: Option<Style>,
}

A serializable collection of widget styling defaults.

Fields

name

A name for the theme used for identification.

padding

Padding for Canvas layout and positioning.

margin

Margin for Canvas layout and positioning.

position

A default widget position.

align

A default alignment for widgets.

background_color

A default background for the theme.

shape_color

A default color for widget shapes.

frame_color

A default color for widget frames.

frame_width

A default width for widget frames.

label_color

A default color for widget labels.

font_size_large

A default "large" font size.

font_size_medium

A default "medium" font size.

font_size_small

A default "small" font size.

maybe_canvas_split

Optional style defaults for a Canvas split.

maybe_button

Specific defaults for a Button widget.

Methods

impl Theme

fn default() -> Theme

The default theme if not loading from file.

fn load(path: &str) -> Result<Theme, String>

Load a theme from file.

fn save(&self, path: &str) -> Result<(), String>

Save a theme to file.

Trait Implementations

Derived Implementations

impl Decodable for Theme

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Theme, __D>

impl Encodable for Theme

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S>

impl Clone for Theme

fn clone(&self) -> Theme

fn clone_from(&mut self, source: &Self)

impl Debug for Theme

fn fmt(&self, __arg_0: &mut Formatter) -> Result