mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking a button.
This commit is contained in:
parent
3a905aed06
commit
977863ea07
37 changed files with 76 additions and 76 deletions
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue