use nimbus roman, theme config, lto

license, philosophy, more shippori chars, slight code shuffling
This commit is contained in:
stjet
2025-02-21 15:09:51 +00:00
parent cb766ce8a5
commit e769bc1452
888 changed files with 5349 additions and 2876 deletions

View File

@@ -4,7 +4,24 @@ use crate::framebuffer::RGBColor;
pub enum Themes {
#[default]
Standard,
//
Night,
Industrial,
Forest,
Royal,
//Parchment,
}
impl Themes {
pub fn from_str(name: &str) -> Option<Self> {
match name {
"Standard" => Some(Themes::Standard),
"Night" => Some(Themes::Night),
"Industrial" => Some(Themes::Industrial),
"Forest" => Some(Themes::Forest),
"Royal" => Some(Themes::Royal),
_ => None,
}
}
}
#[derive(Default)]
@@ -20,7 +37,8 @@ pub struct ThemeInfo {
pub alt_secondary: RGBColor,
}
const THEME_INFOS: [(Themes, ThemeInfo); 1] = [
//besides standard, these themes aren't great, I know
const THEME_INFOS: [(Themes, ThemeInfo); 5] = [
(Themes::Standard, ThemeInfo {
top: [0, 0, 128],
background: [192, 192, 192],
@@ -31,8 +49,52 @@ const THEME_INFOS: [(Themes, ThemeInfo); 1] = [
alt_background: [0, 0, 0],
alt_text: [255, 255, 255],
alt_secondary: [128, 128, 128],
//
}),
(Themes::Night, ThemeInfo {
top: [0, 0, 0],
background: [34, 34, 34],
border_left_top: [239, 239, 239],
border_right_bottom: [0, 0, 0],
text: [239, 239, 239],
top_text: [239, 239, 239],
alt_background: [0, 0, 0],
alt_text: [239, 239, 239],
alt_secondary: [128, 128, 128],
}),
(Themes::Industrial, ThemeInfo {
top: [40, 40, 40],
background: [160, 160, 160],
border_left_top: [255, 255, 255],
border_right_bottom: [0, 0, 0],
text: [0, 0, 0],
top_text: [255, 255, 255],
alt_background: [0, 0, 0],
alt_text: [255, 255, 255],
alt_secondary: [128, 128, 128],
}),
(Themes::Forest, ThemeInfo {
top: [0, 128, 0],
background: [192, 192, 192],
border_left_top: [255, 255, 255],
border_right_bottom: [0, 0, 0],
text: [0, 0, 0],
top_text: [255, 255, 255],
alt_background: [0, 0, 0],
alt_text: [255, 255, 255],
alt_secondary: [128, 128, 128],
}),
(Themes::Royal, ThemeInfo {
top: [128, 0, 128],
background: [192, 192, 192],
border_left_top: [255, 255, 255],
border_right_bottom: [0, 0, 0],
text: [0, 0, 0],
top_text: [255, 255, 255],
alt_background: [0, 0, 0],
alt_text: [255, 255, 255],
alt_secondary: [128, 128, 128],
}),
//
];
pub fn get_theme_info(theme: &Themes) -> Option<ThemeInfo> {