Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
debugger: Polish breakpoint list UI (#41598)
Anthony Eid5ae0768ce43c
diff --git a/crates/debugger_ui/src/session/running/breakpoint_list.rs b/crates/debugger_ui/src/session/running/breakpoint_list.rsindex 36e627a3eba..0a02a5a8e41 100644--- a/crates/debugger_ui/src/session/running/breakpoint_list.rs+++ b/crates/debugger_ui/src/session/running/breakpoint_list.rs@@ -549,7 +549,7 @@ impl BreakpointList {.session.as_ref().map(|session| SupportedBreakpointProperties::from(session.read(cx).capabilities()))- .unwrap_or_else(SupportedBreakpointProperties::empty);+ .unwrap_or_else(SupportedBreakpointProperties::all);let strip_mode = self.strip_mode;uniform_list(@@ -1408,8 +1408,10 @@ impl RenderOnce for BreakpointOptionsStrip {h_flex().gap_px().mr_3() // Space to avoid overlapping with the scrollbar- .child(- div()+ .justify_end()+ .when(has_logs || self.is_selected, |this| {+ this.child(+ div().map(self.add_focus_styles(ActiveBreakpointStripMode::Log,supports_logs,@@ -1438,45 +1440,46 @@ impl RenderOnce for BreakpointOptionsStrip {)}),)- .when(!has_logs && !self.is_selected, |this| this.invisible()),- )- .child(- div()- .map(self.add_focus_styles(- ActiveBreakpointStripMode::Condition,- supports_condition,- window,- cx,- ))- .child(- IconButton::new(- SharedString::from(format!("{id}-condition-toggle")),- IconName::SplitAlt,- )- .shape(ui::IconButtonShape::Square)- .style(style_for_toggle(+ )+ })+ .when(has_condition || self.is_selected, |this| {+ this.child(+ div()+ .map(self.add_focus_styles(ActiveBreakpointStripMode::Condition,- has_condition,+ supports_condition,+ window,+ cx,))- .icon_size(IconSize::Small)- .icon_color(color_for_toggle(has_condition))- .when(has_condition, |this| this.indicator(Indicator::dot().color(Color::Info)))- .disabled(!supports_condition)- .toggle_state(self.is_toggled(ActiveBreakpointStripMode::Condition))- .on_click(self.on_click_callback(ActiveBreakpointStripMode::Condition))- .tooltip(|_window, cx| {- Tooltip::with_meta(- "Set Condition",- None,- "Set condition to evaluate when a breakpoint is hit. Program execution will stop only when the condition is met.",- cx,+ .child(+ IconButton::new(+ SharedString::from(format!("{id}-condition-toggle")),+ IconName::SplitAlt,)- }),- )- .when(!has_condition && !self.is_selected, |this| this.invisible()),- )- .child(- div()+ .shape(ui::IconButtonShape::Square)+ .style(style_for_toggle(+ ActiveBreakpointStripMode::Condition,+ has_condition,+ ))+ .icon_size(IconSize::Small)+ .icon_color(color_for_toggle(has_condition))+ .when(has_condition, |this| this.indicator(Indicator::dot().color(Color::Info)))+ .disabled(!supports_condition)+ .toggle_state(self.is_toggled(ActiveBreakpointStripMode::Condition))+ .on_click(self.on_click_callback(ActiveBreakpointStripMode::Condition))+ .tooltip(|_window, cx| {+ Tooltip::with_meta(+ "Set Condition",+ None,+ "Set condition to evaluate when a breakpoint is hit. Program execution will stop only when the condition is met.",+ cx,+ )+ }),+ )+ )+ })+ .when(has_hit_condition || self.is_selected, |this| {+ this.child(div().map(self.add_focus_styles(ActiveBreakpointStripMode::HitCondition,supports_hit_condition,@@ -1507,10 +1510,8 @@ impl RenderOnce for BreakpointOptionsStrip {cx,)}),- )- .when(!has_hit_condition && !self.is_selected, |this| {- this.invisible()- }),- )+ ))++ })}}