mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 03:39:04 +00:00
Calendar/AddEventDialog: Add a cancel button
This commit is contained in:
parent
d0a4f6678c
commit
7df936b660
Notes:
sideshowbarker
2024-07-16 23:08:48 +09:00
Author: https://github.com/david072
Commit: 7df936b660
Pull-request: https://github.com/SerenityOS/serenity/pull/21976
Issue: https://github.com/SerenityOS/serenity/issues/21713
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
2 changed files with 9 additions and 0 deletions
|
@ -90,6 +90,9 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, EventManager& event_man
|
||||||
done(ExecResult::OK);
|
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 update_starting_input_values = [&, this]() {
|
||||||
auto hour = starting_hour_input.value();
|
auto hour = starting_hour_input.value();
|
||||||
auto minute = starting_minute_input.value();
|
auto minute = starting_minute_input.value();
|
||||||
|
|
|
@ -111,6 +111,12 @@
|
||||||
|
|
||||||
@GUI::Layout::Spacer {}
|
@GUI::Layout::Spacer {}
|
||||||
|
|
||||||
|
@GUI::Button {
|
||||||
|
name: "cancel_button"
|
||||||
|
text: "Cancel"
|
||||||
|
fixed_size: [80, 20]
|
||||||
|
}
|
||||||
|
|
||||||
@GUI::Button {
|
@GUI::Button {
|
||||||
name: "ok_button"
|
name: "ok_button"
|
||||||
text: "OK"
|
text: "OK"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue