Calendar/AddEventDialog: Add a cancel button

This commit is contained in:
david072 2023-11-17 19:48:26 +01:00 committed by Andrew Kaster
commit 7df936b660
Notes: sideshowbarker 2024-07-16 23:08:48 +09:00
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();