debugger: Reduce indent level and step size in variable list (#30122)

This improves the look of the variable list when it's the debug panel is
docked on a side

### Before

![image](https://github.com/user-attachments/assets/6e886fc4-1579-4f4c-bda5-6850d080f34b)
### After

![image](https://github.com/user-attachments/assets/5c4528e5-aa01-4035-9f67-fdf22ce82e34)

Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-05-07 16:06:14 +02:00 committed by GitHub
parent 542c4a3d35
commit a4e26e0710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -675,6 +675,7 @@ impl VariableList {
div()
.id(var_ref as usize)
.group("variable_list_entry")
.pl_2()
.border_1()
.border_r_2()
.border_color(border_color)
@ -692,8 +693,8 @@ impl VariableList {
ListItem::new(SharedString::from(format!("scope-{}", var_ref)))
.selectable(false)
.disabled(self.disabled)
.indent_level(state.depth + 1)
.indent_step_size(px(20.))
.indent_level(state.depth)
.indent_step_size(px(10.))
.always_show_disclosure_icon(true)
.toggle(state.is_expanded)
.on_toggle({
@ -772,6 +773,7 @@ impl VariableList {
div()
.id(variable.item_id())
.group("variable_list_entry")
.pl_2()
.border_1()
.border_r_2()
.border_color(border_color)
@ -791,8 +793,8 @@ impl VariableList {
)))
.disabled(self.disabled)
.selectable(false)
.indent_level(state.depth + 1_usize)
.indent_step_size(px(20.))
.indent_level(state.depth)
.indent_step_size(px(10.))
.always_show_disclosure_icon(true)
.when(var_ref > 0, |list_item| {
list_item.toggle(state.is_expanded).on_toggle(cx.listener({