git_ui: Add dismiss button to status toast (#44813)
Release Notes: - N/A --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
@@ -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)
|
||||
});
|
||||
|
||||
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user