inspector: Fix Inspector on release build. (#906)
This commit is contained in:
parent
372c78fac6
commit
bad9506ebb
3 changed files with 5 additions and 3 deletions
|
|
@ -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),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ doctest = false
|
|||
|
||||
[features]
|
||||
webview = ["dep:wry"]
|
||||
inspector = []
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue