diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:30:33 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-12 20:31:16 +0200 |
commit | 977863ea078e829df10d351a2e9ac3097fb8f5d9 (patch) | |
tree | 5ea075feaa74d0ff74381399c85cae1bfbaaa6b0 /Applications/Calendar | |
parent | 3a905aed063e84331aec82826926cdb89d777892 (diff) | |
download | serenity-977863ea078e829df10d351a2e9ac3097fb8f5d9.zip |
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
Diffstat (limited to 'Applications/Calendar')
-rw-r--r-- | Applications/Calendar/AddEventDialog.cpp | 2 | ||||
-rw-r--r-- | Applications/Calendar/CalendarWidget.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Applications/Calendar/AddEventDialog.cpp b/Applications/Calendar/AddEventDialog.cpp index 50f1080ed7..9d0eabe022 100644 --- a/Applications/Calendar/AddEventDialog.cpp +++ b/Applications/Calendar/AddEventDialog.cpp @@ -107,7 +107,7 @@ AddEventDialog::AddEventDialog(RefPtr<Calendar> calendar, Core::DateTime date_ti auto& ok_button = button_container.add<GUI::Button>("OK"); ok_button.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); ok_button.set_preferred_size(80, 20); - ok_button.on_click = [this] { + ok_button.on_click = [this](auto) { dbg() << "TODO: Add event icon on specific tile"; done(Dialog::ExecOK); }; diff --git a/Applications/Calendar/CalendarWidget.cpp b/Applications/Calendar/CalendarWidget.cpp index 79486fa8c9..3f127e4140 100644 --- a/Applications/Calendar/CalendarWidget.cpp +++ b/Applications/Calendar/CalendarWidget.cpp @@ -64,7 +64,7 @@ CalendarWidget::CalendarWidget() m_prev_month_button->set_font(Gfx::Font::default_bold_font()); m_prev_month_button->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); m_prev_month_button->set_preferred_size(40, 40); - m_prev_month_button->on_click = [this] { + m_prev_month_button->on_click = [this](auto) { int m_target_month = m_calendar->selected_month() - 1; int m_target_year = m_calendar->selected_year(); @@ -79,7 +79,7 @@ CalendarWidget::CalendarWidget() m_next_month_button->set_font(Gfx::Font::default_bold_font()); m_next_month_button->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); m_next_month_button->set_preferred_size(40, 40); - m_next_month_button->on_click = [this] { + m_next_month_button->on_click = [this](auto) { int m_target_month = m_calendar->selected_month() + 1; int m_target_year = m_calendar->selected_year(); @@ -100,7 +100,7 @@ CalendarWidget::CalendarWidget() m_add_event_button = top_right_container.add<GUI::Button>("Add Event"); m_add_event_button->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); m_add_event_button->set_preferred_size(100, 25); - m_add_event_button->on_click = [this] { + m_add_event_button->on_click = [this](auto) { show_add_event_window(); }; |