Crate rat_theme4

Crate rat_theme4 

Source
Expand description

SalsaTheme provides a styling system for ratatui apps.

It has a simple flat naming scheme.

But it can store

§Naming styles

  • It has an extension trait for Style that adds constants for known styles. In the same manner you can add your application specific styles and have them with code completion.

  • For rat-widget composite style it defines an anchor struct WidgetStyle that performs the same purpose.

§Usage


Checkbox::new()
    .styles(theme.style(WidgetStyle::CHECKBOX))
    .render(area, buf, &mut state);

Modules§

palettes

Structs§

Palette
Color palette.
SalsaTheme
SalsaTheme holds any predefined styles for the UI.
WidgetStyle
Anchor struct for the names of composite styles used by rat-widget’s.

Enums§

Category
Categorization of themes. Helpful when extending an existing theme.

Traits§

StyleName
Extension trait for Style that defines some standard names used by rat-theme.

Functions§

create_empty
Create an empty SalsaTheme.
create_palette
Get a Palette by name.
create_theme
Create a theme.
dark_theme
A dark theme.
fallback_theme
A theme to test the fallback-styles of each widget.
log_style_define
Log style definition.
salsa_palettes
All currently existing color palettes.
salsa_themes
Get all Salsa themes.
shell_theme
A ‘shell’-theme.