Tooling · Inspection: inspector, FPS meter, render counter and event logger

install_inspector draws gpui's debug inspector in Ely's look: a panel
with the picked box's source, ids and box model, and its margin,
border, padding and size drawn over the page through raise, since the
panel scrolls. FpsMeter counts frames on the executor's clock and
colors each by the frames it missed. RenderCounter counts the renders
of the view that draws it. EventLogger lists the input that reaches
what it holds, its canvas laid first so a child's stop hides nothing.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-28 07:13:12 -04:00
1 parent 274089a8f6
commit 462e47b854
14 files changed
+1378 -7

No files matched your search

+2
View File
@@ -15,6 +15,7 @@ mod platform;
mod project;
mod syntax;
mod tokens;
mod tooling;
#[cfg(all(test, feature = "test-support"))]
mod tests;
@@ -43,6 +44,7 @@ pub use syntax::{SyntaxTheme, syntax_themes};
pub use tokens::{
AvatarSize, ContainerSize, ControlSize, Density, Elevation, IconSize, Radius, TextSize,
};
pub use tooling::ToolingSizes;
const FRAME: Duration = Duration::from_millis(8);
+21
View File
@@ -0,0 +1,21 @@
use gpui::Rems;
use super::{Theme, tokens::px_to_rems};
/// The tooling chapter's measures.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ToolingSizes {
/// An FPS meter's graph, across and tall.
pub graph: (Rems, Rems),
/// How tall an event log grows before it scrolls.
pub log: Rems,
}
impl Theme {
pub fn tooling(&self) -> ToolingSizes {
ToolingSizes {
graph: (px_to_rems(160.0), px_to_rems(40.0)),
log: px_to_rems(200.0),
}
}
}