diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/theme.rs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/theme.rs b/src/theme.rs index 05a6769..5d092d3 100644 --- a/src/theme.rs +++ b/src/theme.rs | |||
@@ -1,29 +1,30 @@ | |||
1 | use cursive::theme::Color::*; | 1 | use cursive::theme; |
2 | use cursive::theme::BaseColor::*; | 2 | use cursive::theme::BaseColor::*; |
3 | use cursive::theme::BorderStyle; | 3 | use cursive::theme::BorderStyle; |
4 | use cursive::theme; | 4 | use cursive::theme::Color::*; |
5 | use cursive::theme::PaletteColor::*; | ||
5 | 6 | ||
6 | pub fn palette_gen() -> theme::Palette { | 7 | pub fn palette_gen() -> theme::Palette { |
7 | let mut palette: theme::Palette = theme::Palette::default(); | 8 | let mut palette = theme::Palette::default(); |
8 | 9 | ||
9 | palette.set_color("background" , Dark(Black)); | 10 | palette[Background] = Dark(Black); |
10 | palette.set_color("shadow" , Light(Black)); | 11 | palette[Shadow] = Light(Black); |
11 | palette.set_color("view" , Dark(Black)); | 12 | palette[View] = Dark(Black); |
12 | palette.set_color("primary" , Dark(White)); | 13 | palette[Primary] = Dark(White); |
13 | palette.set_color("secondary" , Light(Black)); | 14 | palette[Secondary] = Light(Black); |
14 | palette.set_color("teritary" , Dark(Green)); | 15 | palette[Tertiary] = Dark(Green); |
15 | palette.set_color("title_primary" , Dark(Blue)); | 16 | palette[TitlePrimary] = Dark(Blue); |
16 | palette.set_color("title_secondary" , Dark(Green)); | 17 | palette[TitleSecondary] = Dark(Green); |
17 | palette.set_color("highlight" , Dark(Blue)); | 18 | palette[Highlight] = Dark(Blue); |
18 | palette.set_color("highlight_inactive" , Light(Black)); | 19 | palette[HighlightInactive] = Light(Black); |
19 | 20 | ||
20 | palette | 21 | palette |
21 | } | 22 | } |
22 | 23 | ||
23 | pub fn theme_gen() -> theme::Theme { | 24 | pub fn theme_gen() -> theme::Theme { |
24 | let mut wikitheme = theme::load_default(); | 25 | let mut wikitheme = theme::Theme::default(); |
25 | 26 | ||
26 | wikitheme.shadow = false; | 27 | wikitheme.shadow = false; |
27 | wikitheme.borders = BorderStyle::Simple; | 28 | wikitheme.borders = BorderStyle::Simple; |
28 | wikitheme.palette = palette_gen(); | 29 | wikitheme.palette = palette_gen(); |
29 | 30 | ||