//! Window chrome: Windows and Linux client-side decorations are custom drawn; macOS and Linux //! server-side decorations use the platform's native chrome. use crate::theme::Theme; use gpui::{Div, TitlebarOptions, Window}; use horizon_launcher::backend::Appearance; /// Whether Windows uses a transparent native title bar for the launcher's custom chrome. pub const DRAWN: bool = cfg!(target_os = "windows"); pub fn draws_brand(window: &Window) -> bool { #[cfg(target_os = "linux")] return matches!( window.window_decorations(), gpui::Decorations::Client { .. } ); #[cfg(not(target_os = "linux"))] { let _ = window; DRAWN } } pub fn options() -> TitlebarOptions { TitlebarOptions { title: Some("Horizon".into()), appears_transparent: DRAWN, ..Default::default() } } #[cfg(all(not(target_os = "windows"), not(target_os = "linux")))] pub fn render(_theme: &Theme, _window: &Window) -> Option