LibGUI: Tweak GUI::Button::on_context_menu_event hook signature

Pass the ContextMenuEvent as a mutable reference, so that clients
want to accept/ignore the event.
This commit is contained in:
Andreas Kling 2021-05-15 22:55:57 +02:00
commit 0ee7991dca
Notes: sideshowbarker 2024-07-18 18:04:28 +09:00

View file

@ -28,7 +28,7 @@ public:
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
Function<void(unsigned modifiers)> on_click;
Function<void(const ContextMenuEvent&)> on_context_menu_request;
Function<void(ContextMenuEvent&)> on_context_menu_request;
void set_button_style(Gfx::ButtonStyle style) { m_button_style = style; }
Gfx::ButtonStyle button_style() const { return m_button_style; }