feat: impl catppuccin theme
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::{api, app};
|
||||
|
||||
pub struct Global {
|
||||
pub safe_area: gpui::Bounds<gpui::Pixels>,
|
||||
pub theme_family: theme::ThemeFamily,
|
||||
pub current_theme: theme::Theme,
|
||||
pub rng: rand::prelude::ThreadRng,
|
||||
}
|
||||
@@ -18,7 +19,9 @@ impl Chrome {
|
||||
pub fn new(window: &mut gpui::Window, cx: &mut gpui::Context<Self>) -> Self {
|
||||
cx.observe_window_appearance(window, |_, window, cx| {
|
||||
cx.update_global::<app::Global, ()>(|global, cx| {
|
||||
global.current_theme = window.appearance().into();
|
||||
global.current_theme = global
|
||||
.theme_family
|
||||
.theme_for_appearance(window.appearance());
|
||||
cx.notify();
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user