Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git_ui: Add dismiss button to status toast (#44813)
Xiaobo Liubd481dea48e6
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rsindex 20ba1d5b903..527e5062ae4 100644--- a/crates/git_ui/src/git_panel.rs+++ b/crates/git_ui/src/git_panel.rs@@ -3598,6 +3598,7 @@ impl GitPanel {.icon(ToastIcon::new(IconName::GitBranchAlt).color(Color::Muted)).action(text, move |_, cx| cx.open_url(&link)),}+ .dismiss_button(true)});workspace.toggle_status_toast(status_toast, cx)});diff --git a/crates/notifications/src/status_toast.rs b/crates/notifications/src/status_toast.rsindex 7affa93f5a4..40c5bdc8f85 100644--- a/crates/notifications/src/status_toast.rs+++ b/crates/notifications/src/status_toast.rs@@ -137,7 +137,8 @@ impl Render for StatusToast {let handle = self.this_handle.clone();this.child(IconButton::new("dismiss", IconName::Close)- .icon_size(IconSize::XSmall)+ .shape(ui::IconButtonShape::Square)+ .icon_size(IconSize::Small).icon_color(Color::Muted).tooltip(Tooltip::text("Dismiss")).on_click(move |_click_event, _window, cx| {