Expand description
UI theme methods.
Provides various methods for changing and querying the current UI theme used to render text and UI widgets.
§Example
fn on_update(&mut self, s: &mut PixState) -> PixResult<()> {
s.fill(Color::CADET_BLUE); // Change text color
s.font_size(14)?;
s.font_style(FontStyle::BOLD);
s.font_family(Font::INCONSOLATA)?;
s.text("Blue, bold, size 14 text in Inconsolata font")?;
Ok(())
}Structs§
- Colors
- A set of Colors for theming UI elements.
- Font
- Represents a font family name along with the font glyph source.
- Font
Styles - A set of
FontStyles for body, heading, and monospace text. - Fonts
- A set of font families for body, heading, and monospace text.
- Spacing
- A set of styles for sizing, padding, borders, etc for theming UI elements.
- Spacing
Builder - Builds a Spacing instance by customizing various space and padding settings.
- Theme
- A UI
Themecontaining font families, sizes, styles, and colors. - Theme
Builder - A builder to generate custom Themes.