feat: change light mode surface color
This commit is contained in:
30
src/theme.rs
30
src/theme.rs
@@ -52,20 +52,20 @@ impl ThemeFamily {
|
||||
|
||||
pub const fn id(self) -> &'static str {
|
||||
match self {
|
||||
Self::Catppuccin => "catppuccin",
|
||||
| Self::Catppuccin => "catppuccin",
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn label(self) -> &'static str {
|
||||
match self {
|
||||
Self::Catppuccin => "Catppuccin",
|
||||
| Self::Catppuccin => "Catppuccin",
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn variant(self, mode: ThemeMode) -> ThemeVariant {
|
||||
match (self, mode) {
|
||||
(Self::Catppuccin, ThemeMode::Light) => ThemeVariant::CatppuccinLatte,
|
||||
(Self::Catppuccin, ThemeMode::Dark) => ThemeVariant::CatppuccinMocha,
|
||||
| (Self::Catppuccin, ThemeMode::Light) => ThemeVariant::CatppuccinLatte,
|
||||
| (Self::Catppuccin, ThemeMode::Dark) => ThemeVariant::CatppuccinMocha,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,33 +92,33 @@ impl ThemeVariant {
|
||||
|
||||
pub const fn family(self) -> ThemeFamily {
|
||||
match self {
|
||||
Self::CatppuccinLatte | Self::CatppuccinMocha => ThemeFamily::Catppuccin,
|
||||
| Self::CatppuccinLatte | Self::CatppuccinMocha => ThemeFamily::Catppuccin,
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn mode(self) -> ThemeMode {
|
||||
match self {
|
||||
Self::CatppuccinLatte => ThemeMode::Light,
|
||||
Self::CatppuccinMocha => ThemeMode::Dark,
|
||||
| Self::CatppuccinLatte => ThemeMode::Light,
|
||||
| Self::CatppuccinMocha => ThemeMode::Dark,
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn label(self) -> &'static str {
|
||||
match self {
|
||||
Self::CatppuccinLatte => "Catppuccin Latte",
|
||||
Self::CatppuccinMocha => "Catppuccin Mocha",
|
||||
| Self::CatppuccinLatte => "Catppuccin Latte",
|
||||
| Self::CatppuccinMocha => "Catppuccin Mocha",
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn theme(self) -> Theme {
|
||||
match self {
|
||||
Self::CatppuccinLatte => Theme {
|
||||
| Self::CatppuccinLatte => Theme {
|
||||
id: "catppuccin-latte",
|
||||
name: "Catppuccin Latte",
|
||||
mode: ThemeMode::Light,
|
||||
colors: ThemeColors {
|
||||
background: hex(0xeff1f5),
|
||||
surface: hex(0xe6e9ef),
|
||||
surface: hex(0xeff1f5),
|
||||
surface_elevated: hex(0xdce0e8),
|
||||
border: hex(0xccd0da),
|
||||
text: hex(0x4c4f69),
|
||||
@@ -131,7 +131,7 @@ impl ThemeVariant {
|
||||
danger: hex(0xd20f39),
|
||||
},
|
||||
},
|
||||
Self::CatppuccinMocha => Theme {
|
||||
| Self::CatppuccinMocha => Theme {
|
||||
id: "catppuccin-mocha",
|
||||
name: "Catppuccin Mocha",
|
||||
mode: ThemeMode::Dark,
|
||||
@@ -157,10 +157,8 @@ impl ThemeVariant {
|
||||
impl From<gpui::WindowAppearance> for ThemeMode {
|
||||
fn from(value: gpui::WindowAppearance) -> Self {
|
||||
match value {
|
||||
gpui::WindowAppearance::Light | gpui::WindowAppearance::VibrantLight => {
|
||||
ThemeMode::Light
|
||||
}
|
||||
gpui::WindowAppearance::Dark | gpui::WindowAppearance::VibrantDark => ThemeMode::Dark,
|
||||
| gpui::WindowAppearance::Light | gpui::WindowAppearance::VibrantLight => ThemeMode::Light,
|
||||
| gpui::WindowAppearance::Dark | gpui::WindowAppearance::VibrantDark => ThemeMode::Dark,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user