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


// ratatui Style
let s = theme.style::<Style>(Style::SELECT);

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

Modules§

palette
Palette is the color palette for salsa-themes.
palettes
Currently shipped palettes.
theme
SalsaTheme is the main structure for themes.
themes

Structs§

WidgetStyle
Anchor struct for the names of composite styles used by rat-widget’s.

Traits§

RatWidgetColor
Extension trait for Color that defines standard names used by rat-theme to define color-aliases.
StyleName
Extension trait for Style that defines some standard names used by rat-theme/rat-widget

Functions§

create_palette
Create one of the defined palettes.
create_theme
Create one of the defined themes.
log_style_define
Log style definition. May help debugging styling problems …
salsa_palettes
All defined color palettes.
salsa_themes
All defined rat-salsa themes.