From 3e3618b3ffeb1c3e01b3a63398177fd989798978 Mon Sep 17 00:00:00 2001 From: Coenen Benjamin Date: Tue, 28 Oct 2025 08:04:21 +0100 Subject: [PATCH] debugger: Add horizontal scrollbar for frame item and tooltip for variables (#41261) Closes #40360 I first tried to use an horizontal scrollbar also for variables but as it's a List that can be collapsed it didn't feel natural so I ended up adding a tooltip to have to full value of the variable when you hover the item. (cf screenshots). https://github.com/user-attachments/assets/70c4150d-b967-46b0-8720-82bbad9c9cca https://github.com/user-attachments/assets/d0b52189-b090-4824-8eb7-2f455fa58b33 Release Notes: - Added: for debugger UI horizontal scrollbar for frame item and tooltip for variables. Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com> --- crates/debugger_ui/src/session/running/stack_frame_list.rs | 1 + crates/debugger_ui/src/session/running/variable_list.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/debugger_ui/src/session/running/stack_frame_list.rs b/crates/debugger_ui/src/session/running/stack_frame_list.rs index 3fc7e8ce392b5ea3982a168fcc8f6dcfad1f7313..a8fabd327a3de630ff884899fe7af1167932618c 100644 --- a/crates/debugger_ui/src/session/running/stack_frame_list.rs +++ b/crates/debugger_ui/src/session/running/stack_frame_list.rs @@ -566,6 +566,7 @@ impl StackFrameList { this.activate_selected_entry(window, cx); })) .hover(|style| style.bg(cx.theme().colors().element_hover).cursor_pointer()) + .overflow_x_scroll() .child( v_flex() .gap_0p5() diff --git a/crates/debugger_ui/src/session/running/variable_list.rs b/crates/debugger_ui/src/session/running/variable_list.rs index f2b79523fe3d7329073ad618a9d5c5d219a32f3c..c69bdfbe7ca8712284dd971d2e86f31f99cd696d 100644 --- a/crates/debugger_ui/src/session/running/variable_list.rs +++ b/crates/debugger_ui/src/session/running/variable_list.rs @@ -1129,6 +1129,7 @@ impl VariableList { this.color(Color::from(color)) }), ) + .tooltip(Tooltip::text(value)) } }) .into_any_element()