diff options
-rwxr-xr-x | src/application.rs | 2 | ||||
-rwxr-xr-x | src/ui/task_details.rs | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/application.rs b/src/application.rs index 4edb64d..9120446 100755 --- a/src/application.rs +++ b/src/application.rs @@ -179,6 +179,8 @@ impl FurtheranceApplication { (&gettext("Delete"), gtk::ResponseType::Accept) ]); dialog.set_default_response(gtk::ResponseType::Accept); + let delete_btn = dialog.widget_for_response(gtk::ResponseType::Accept).unwrap(); + delete_btn.add_css_class("destructive-action"); let message_area = dialog.message_area().downcast::<gtk::Box>().unwrap(); let explanation = gtk::Label::new(Some(&gettext("This will delete ALL of your task history."))); 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!("<span size='x-large' weight='bold'>{}</span>", &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 { |