use gpui::Rgba; /// Colors used by the [`crate::WebView`] element. /// /// Installed as a gpui global so a host application can restyle every webview /// at once. Falls back to [`WebViewTheme::default`] when no global is set. #[derive(Clone, Copy, Debug)] pub struct WebViewTheme { /// Painted behind the page while it loads / has nothing to show. pub background: Rgba, /// Background of the status-text overlay. pub status_background: Rgba, /// Border of the status-text overlay. pub status_border: Rgba, /// Text color of the status-text overlay. pub status_foreground: Rgba, } impl gpui::Global for WebViewTheme {} impl Default for WebViewTheme { fn default() -> Self { Self { background: gpui::rgb(0x18181b), status_background: gpui::rgb(0x09090b), status_border: gpui::rgb(0x27272a), status_foreground: gpui::rgb(0x9ca3af), } } }