From b01d863492a9b71efa6784935c7cd607f6350aa9 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 13 Nov 2024 08:58:00 +0200 Subject: [PATCH] decorate response variants --- src/app/browser/welcome/widget.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/browser/welcome/widget.rs b/src/app/browser/welcome/widget.rs index dfab7e86..d1172b3a 100644 --- a/src/app/browser/welcome/widget.rs +++ b/src/app/browser/welcome/widget.rs @@ -1,6 +1,6 @@ use adw::{ - prelude::{AdwDialogExt, AlertDialogExtManual}, - AlertDialog, + prelude::{AdwDialogExt, AlertDialogExt, AlertDialogExtManual}, + AlertDialog, ResponseAppearance, }; use gtk::prelude::IsA; @@ -22,11 +22,15 @@ impl Widget { let gobject = AlertDialog::builder() .heading(HEADING) .body(BODY) - .default_response(RESPONSE_QUIT.1) + .close_response(RESPONSE_QUIT.0) + .default_response(RESPONSE_CREATE.0) .build(); gobject.add_responses(&[RESPONSE_QUIT, RESPONSE_CREATE]); + gobject.set_response_appearance(RESPONSE_CREATE.0, ResponseAppearance::Suggested); + gobject.set_response_appearance(RESPONSE_QUIT.0, ResponseAppearance::Destructive); + // Return new `Self` Self { gobject } }