use crate::theme::{Theme, Themed}; use gpui2::Element; use std::marker::PhantomData; pub trait ElementExt: Element { fn themed(self, theme: Theme) -> Themed where Self: Sized; } impl> ElementExt for E { fn themed(self, theme: Theme) -> Themed where Self: Sized, { Themed { child: self, theme, view_type: PhantomData, } } }