From d6b1801fb3c2649cc8c4e7f79a4e3b709db79355 Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Wed, 8 Oct 2025 19:17:11 +0200 Subject: [PATCH] inspector_ui: Split out size from bounds string (#39703) # How Tweak the way in which inspected element bounds and size are printed to improved readability of GPUI Inspector data. > [!note] > It looks like the only place in the workspace where bounds are used within formatted print is GPUI Inspector panel, but I decided to do not alter [GPUI `geometry.rs` default format](https://github.com/zed-industries/zed/blob/a7e7f460205bc6eaa397f20c1bcf8c4105d93403/crates/gpui/src/geometry.rs#L1579-L1587), since adding multiline output and additional labels in there does not feel like the beast approach, but maybe I'm wrong? Release Notes: - N/A # Preview Screenshot 2025-10-07 at 20 08 35 Screenshot 2025-10-07 at 20 09 24 --- crates/inspector_ui/src/div_inspector.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/inspector_ui/src/div_inspector.rs b/crates/inspector_ui/src/div_inspector.rs index 5f0786c885b5636363c6f5f153c7db48d7b6e432..da99c5b92c1e6ad4d8a3e92ed2e565bcb518e227 100644 --- a/crates/inspector_ui/src/div_inspector.rs +++ b/crates/inspector_ui/src/div_inspector.rs @@ -576,7 +576,12 @@ fn render_layout_state(inspector_state: &DivInspectorState, cx: &App) -> Div { .child( div() .text_ui(cx) - .child(format!("Bounds: {}", inspector_state.bounds)), + .child(format!( + "Bounds: ⌜{} - {}⌟", + inspector_state.bounds.origin, + inspector_state.bounds.bottom_right() + )) + .child(format!("Size: {}", inspector_state.bounds.size)), ) .child( div()