mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
decorate response variants
This commit is contained in:
parent
096b2c5178
commit
b01d863492
@ -1,6 +1,6 @@
|
|||||||
use adw::{
|
use adw::{
|
||||||
prelude::{AdwDialogExt, AlertDialogExtManual},
|
prelude::{AdwDialogExt, AlertDialogExt, AlertDialogExtManual},
|
||||||
AlertDialog,
|
AlertDialog, ResponseAppearance,
|
||||||
};
|
};
|
||||||
use gtk::prelude::IsA;
|
use gtk::prelude::IsA;
|
||||||
|
|
||||||
@ -22,11 +22,15 @@ impl Widget {
|
|||||||
let gobject = AlertDialog::builder()
|
let gobject = AlertDialog::builder()
|
||||||
.heading(HEADING)
|
.heading(HEADING)
|
||||||
.body(BODY)
|
.body(BODY)
|
||||||
.default_response(RESPONSE_QUIT.1)
|
.close_response(RESPONSE_QUIT.0)
|
||||||
|
.default_response(RESPONSE_CREATE.0)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
gobject.add_responses(&[RESPONSE_QUIT, RESPONSE_CREATE]);
|
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`
|
// Return new `Self`
|
||||||
Self { gobject }
|
Self { gobject }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user