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 /Libraries/LibGUI/Button.cpp | |
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 'Libraries/LibGUI/Button.cpp')
-rw-r--r-- | Libraries/LibGUI/Button.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Button.cpp b/Libraries/LibGUI/Button.cpp index ace26362ec..f662c82de4 100644 --- a/Libraries/LibGUI/Button.cpp +++ b/Libraries/LibGUI/Button.cpp @@ -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); } |