git_ui: Add dismiss button to status toast (#44813)

Xiaobo Liu and Danilo Leal created

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Change summary

crates/git_ui/src/git_panel.rs           | 1 +
crates/notifications/src/status_toast.rs | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)

Detailed changes

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)
         });

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| {