diff --git a/crates/ui/src/theme.rs b/crates/ui/src/theme.rs index 3eb5e9ed..5ea72c13 100644 --- a/crates/ui/src/theme.rs +++ b/crates/ui/src/theme.rs @@ -2,7 +2,7 @@ use std::ops::Deref; use gpui::{ hsla, point, AppContext, BoxShadow, Global, Hsla, ModelContext, Pixels, SharedString, - ViewContext, WindowAppearance, + ViewContext, WindowAppearance, WindowContext, }; pub trait ActiveTheme { @@ -27,6 +27,12 @@ impl<'a, V> ActiveTheme for ModelContext<'a, V> { } } +impl<'a> ActiveTheme for WindowContext<'a> { + fn theme(&self) -> &Theme { + self.deref().theme() + } +} + /// Make a [gpui::Hsla] color. /// /// h - 0 - 360.0