mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +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:
@@ -86,7 +86,7 @@ void Button::paint_event(PaintEvent& event)
|
||||
paint_text(painter, text_rect, font, text_alignment());
|
||||
}
|
||||
|
||||
void Button::click()
|
||||
void Button::click(unsigned modifiers)
|
||||
{
|
||||
if (!is_enabled())
|
||||
return;
|
||||
@@ -96,7 +96,7 @@ void Button::click()
|
||||
set_checked(!is_checked());
|
||||
}
|
||||
if (on_click)
|
||||
on_click();
|
||||
on_click(modifiers);
|
||||
if (m_action)
|
||||
m_action->activate(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user