Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git_panel: Apply tooltip to checkbox instead of container (#25533)
5briancea06bc0ce6a
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rsindex 22222b197e4..f8e96095d86 100644--- a/crates/git_ui/src/git_panel.rs+++ b/crates/git_ui/src/git_panel.rs@@ -2493,16 +2493,18 @@ impl GitPanel {})});- let start_slot = h_flex()- .id(("start-slot", ix))- .gap(DynamicSpacing::Base04.rems(cx))- .child(checkbox)- .tooltip(|window, cx| Tooltip::for_action("Stage File", &ToggleStaged, window, cx))- .child(git_status_icon(status, cx))- .on_mouse_down(MouseButton::Left, |_, _, cx| {- // prevent the list item active state triggering when toggling checkbox- cx.stop_propagation();- });+ let start_slot =+ h_flex()+ .id(("start-slot", ix))+ .gap(DynamicSpacing::Base04.rems(cx))+ .child(checkbox.tooltip(|window, cx| {+ Tooltip::for_action("Stage File", &ToggleStaged, window, cx)+ }))+ .child(git_status_icon(status, cx))+ .on_mouse_down(MouseButton::Left, |_, _, cx| {+ // prevent the list item active state triggering when toggling checkbox+ cx.stop_propagation();+ });div().w_full()