about summary refs log tree commit diff
path: root/src/ui/task_details.rs
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-04-20 11:03:29 +0300
committerRicky Kresslein <rk@lakoliu.com>2022-04-20 11:22:07 +0300
commitc93eb023478d004b59e93513626ec804dafd6b42 (patch)
treefc3bee454c2444c3b353b3b15c781502b58ca871 /src/ui/task_details.rs
parent8c5a5c0ea6f2b23254cf1a201a22668510162c8d (diff)
downloadFurtherance-c93eb023478d004b59e93513626ec804dafd6b42.tar.zst
Add destructive-action class to all delete buttons (Issue #31)
Diffstat (limited to 'src/ui/task_details.rs')
-rwxr-xr-xsrc/ui/task_details.rs4
1 files changed, 4 insertions, 0 deletions
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 {