diff --git a/src/ui/profile_editor.rs b/src/ui/profile_editor.rs index 20fbdc9..20e1ed2 100644 --- a/src/ui/profile_editor.rs +++ b/src/ui/profile_editor.rs @@ -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 { diff --git a/src/ui/wivrn_conf_editor.rs b/src/ui/wivrn_conf_editor.rs index 460e533..bc44305 100644 --- a/src/ui/wivrn_conf_editor.rs +++ b/src/ui/wivrn_conf_editor.rs @@ -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 {