aboutsummaryrefslogtreecommitdiff
path: root/src/theme.rs
blob: 5d092d388c65045399587d319c6a9819df7d67dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use cursive::theme;
use cursive::theme::BaseColor::*;
use cursive::theme::BorderStyle;
use cursive::theme::Color::*;
use cursive::theme::PaletteColor::*;

pub fn palette_gen() -> theme::Palette {
    let mut palette = theme::Palette::default();

    palette[Background] = Dark(Black);
    palette[Shadow] = Light(Black);
    palette[View] = Dark(Black);
    palette[Primary] = Dark(White);
    palette[Secondary] = Light(Black);
    palette[Tertiary] = Dark(Green);
    palette[TitlePrimary] = Dark(Blue);
    palette[TitleSecondary] = Dark(Green);
    palette[Highlight] = Dark(Blue);
    palette[HighlightInactive] = Light(Black);

    palette
}

pub fn theme_gen() -> theme::Theme {
    let mut wikitheme = theme::Theme::default();

    wikitheme.shadow = false;
    wikitheme.borders = BorderStyle::Simple;
    wikitheme.palette = palette_gen();

    wikitheme
}