From c93eb023478d004b59e93513626ec804dafd6b42 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Wed, 20 Apr 2022 11:03:29 +0300 Subject: Add destructive-action class to all delete buttons (Issue #31) --- src/ui/task_details.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/task_details.rs') diff --git a/src/ui/task_details.rs b/src/ui/task_details.rs index 7e306e8..d96a993 100755 --- a/src/ui/task_details.rs +++ b/src/ui/task_details.rs @@ -242,6 +242,8 @@ impl FurTaskDetails { gtk::ButtonsType::OkCancel, Some(&format!("{}", &gettext("Delete task?"))), ); + let delete_btn = delete_confirmation.widget_for_response(gtk::ResponseType::Ok).unwrap(); + delete_btn.add_css_class("destructive-action"); delete_confirmation.connect_response(clone!( @strong dialog, @@ -470,6 +472,8 @@ impl FurTaskDetails { (&gettext("Cancel"), gtk::ResponseType::Reject), (&gettext("Delete"), gtk::ResponseType::Accept) ]); + let delete_btn = dialog.widget_for_response(gtk::ResponseType::Accept).unwrap(); + delete_btn.add_css_class("destructive-action"); dialog.connect_response(clone!(@strong dialog => move |_,resp|{ if resp == gtk::ResponseType::Accept { -- cgit 1.4.1