1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

Calendar/AddEventDialog: Add a cancel button

This commit is contained in:
david072 2023-11-17 19:48:26 +01:00 committed by Andrew Kaster
parent d0a4f6678c
commit 7df936b660
2 changed files with 9 additions and 0 deletions

View file

@ -90,6 +90,9 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, EventManager& event_man
done(ExecResult::OK);
};
auto& cancel_button = *widget->find_descendant_of_type_named<GUI::Button>("cancel_button");
cancel_button.on_click = [&](auto) { done(ExecResult::Cancel); };
auto update_starting_input_values = [&, this]() {
auto hour = starting_hour_input.value();
auto minute = starting_minute_input.value();

View file

@ -111,6 +111,12 @@
@GUI::Layout::Spacer {}
@GUI::Button {
name: "cancel_button"
text: "Cancel"
fixed_size: [80, 20]
}
@GUI::Button {
name: "ok_button"
text: "OK"