aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2018-07-05 14:54:28 +0100
committerNerdyPepper <[email protected]>2018-07-05 14:54:28 +0100
commita1e4769c34219e28ec489159f01491dbffc929eb (patch)
tree49105512931df46911a9a9f0978225f9c13a8865 /src
parent0179d18834a17779a1b5b6da8573f3d575788e94 (diff)
Refactor into theme.rs
Diffstat (limited to 'src')
-rw-r--r--src/theme.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/theme.rs b/src/theme.rs
new file mode 100644
index 0000000..f091358
--- /dev/null
+++ b/src/theme.rs
@@ -0,0 +1,31 @@
1use cursive::theme::Color::*;
2use cursive::theme::BaseColor::*;
3use cursive::theme::BorderStyle;
4use cursive::theme;
5
6pub fn palette_gen() -> theme::Palette {
7 let mut palette: theme::Palette = theme::Palette::default();
8
9 palette.set_color("background" , Dark(Black));
10 palette.set_color("shadow" , Dark(White));
11 palette.set_color("view" , Dark(Black));
12 palette.set_color("primary" , Dark(White));
13 palette.set_color("secondary" , Light(Black));
14 palette.set_color("teritary" , Dark(Green));
15 palette.set_color("title_primary" , Dark(Blue));
16 palette.set_color("title_secondary" , Dark(Green));
17 palette.set_color("highlight" , Dark(Blue));
18 palette.set_color("highlight_inactive" , Light(Black));
19
20 palette
21}
22
23pub fn theme_gen() -> theme::Theme {
24 let mut wikitheme = theme::load_default();
25
26 wikitheme.shadow = false;
27 wikitheme.borders = BorderStyle::Simple;
28 wikitheme.palette = palette_gen();
29
30 wikitheme
31}