maj/majc/src/theme.rs

20 lines
624 B
Rust
Raw Normal View History

use cursive::{
theme::{BaseColor, BorderStyle, Color, PaletteColor},
Cursive,
};
pub fn apply(siv: &mut Cursive) {
// We'll return the current theme with a small modification.
let mut theme = siv.current_theme().clone();
theme.palette[PaletteColor::Background] = Color::TerminalDefault;
theme.palette[PaletteColor::View] = Color::TerminalDefault;
theme.palette[PaletteColor::Primary] = Color::Dark(BaseColor::White);
theme.palette[PaletteColor::TitlePrimary] = Color::Light(BaseColor::White);
theme.shadow = false;
theme.borders = BorderStyle::Simple;
siv.set_theme(theme);
}