mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 11:35:48 +00:00
feat: more explicit cancel button for profile editor and wivrn config editor
This commit is contained in:
parent
cd0e55aa9b
commit
e8220b410f
2 changed files with 18 additions and 0 deletions
|
@ -66,6 +66,8 @@ impl SimpleComponent for ProfileEditor {
|
|||
set_vexpand: true,
|
||||
add_top_bar: top_bar = &adw::HeaderBar {
|
||||
set_vexpand: false,
|
||||
set_show_end_title_buttons: false,
|
||||
set_show_start_title_buttons: false,
|
||||
pack_end: save_btn = >k::Button {
|
||||
set_label: "Save",
|
||||
add_css_class: "suggested-action",
|
||||
|
@ -73,6 +75,13 @@ impl SimpleComponent for ProfileEditor {
|
|||
sender.input(Self::Input::SaveProfile);
|
||||
},
|
||||
},
|
||||
pack_start: cancel_btn = >k::Button {
|
||||
set_label: "Cancel",
|
||||
add_css_class: "destructive-action",
|
||||
connect_clicked[win] => move |_| {
|
||||
win.close();
|
||||
}
|
||||
},
|
||||
},
|
||||
#[wrap(Some)]
|
||||
set_content: pref_page = &adw::PreferencesPage {
|
||||
|
|
|
@ -49,6 +49,8 @@ impl SimpleComponent for WivrnConfEditor {
|
|||
set_vexpand: true,
|
||||
add_top_bar: top_bar = &adw::HeaderBar {
|
||||
set_vexpand: false,
|
||||
set_show_end_title_buttons: false,
|
||||
set_show_start_title_buttons: false,
|
||||
pack_end: save_btn = >k::Button {
|
||||
set_label: "Save",
|
||||
add_css_class: "suggested-action",
|
||||
|
@ -56,6 +58,13 @@ impl SimpleComponent for WivrnConfEditor {
|
|||
sender.input(Self::Input::Save);
|
||||
},
|
||||
},
|
||||
pack_start: cancel_btn = >k::Button {
|
||||
set_label: "Cancel",
|
||||
add_css_class: "destructive-action",
|
||||
connect_clicked[win] => move |_| {
|
||||
win.close();
|
||||
}
|
||||
},
|
||||
},
|
||||
#[wrap(Some)]
|
||||
set_content: pref_page = &adw::PreferencesPage {
|
||||
|
|
Loading…
Add table
Reference in a new issue