diff --git a/crates/story/src/title_bar.rs b/crates/story/src/title_bar.rs index 0e6cc5d6..1ea61435 100644 --- a/crates/story/src/title_bar.rs +++ b/crates/story/src/title_bar.rs @@ -13,7 +13,7 @@ use gpui_component::{ popup_menu::PopupMenuExt as _, scroll::ScrollbarShow, set_locale, ActiveTheme as _, ContextModal as _, IconName, Sizable as _, Theme, ThemeMode, - TitleBar, ToggleInspector, + TitleBar, }; use crate::{SelectFont, SelectLocale, SelectRadius, SelectScrollbarShow}; @@ -312,8 +312,6 @@ impl Render for FontSizeSelector { scroll_show == ScrollbarShow::Always, Box::new(SelectScrollbarShow(ScrollbarShow::Always)), ) - .separator() - .menu("Inspector", Box::new(ToggleInspector)) }) .anchor(Corner::TopRight), ) diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml index 88783750..91dce9bf 100644 --- a/crates/ui/Cargo.toml +++ b/crates/ui/Cargo.toml @@ -13,6 +13,7 @@ doctest = false [features] webview = ["dep:wry"] +inspector = [] [dependencies] anyhow = "1" diff --git a/crates/ui/src/lib.rs b/crates/ui/src/lib.rs index 6762bad3..91496318 100644 --- a/crates/ui/src/lib.rs +++ b/crates/ui/src/lib.rs @@ -2,6 +2,7 @@ mod colors; mod event; mod focusable; mod icon; +#[cfg(any(feature = "inspector", debug_assertions))] mod inspector; mod kbd; mod menu; @@ -65,6 +66,7 @@ pub use wry; pub use crate::Disableable; pub use event::InteractiveElementExt; pub use focusable::FocusableCycle; +#[cfg(any(feature = "inspector", debug_assertions))] pub use inspector::*; pub use menu::{context_menu, popup_menu}; pub use root::{ContextModal, Root}; @@ -90,6 +92,7 @@ rust_i18n::i18n!("locales", fallback = "en"); /// You can initialize the UI module at your application's entry point. pub fn init(cx: &mut App) { theme::init(cx); + #[cfg(any(feature = "inspector", debug_assertions))] inspector::init(cx); date_picker::init(cx); dock::init(cx);