Skip to content

Commit

Permalink
LibGUI: Tweak GUI::Button::on_context_menu_event hook signature
Browse files Browse the repository at this point in the history
Pass the ContextMenuEvent as a mutable reference, so that clients
want to accept/ignore the event.
  • Loading branch information
awesomekling committed May 15, 2021
1 parent 5daf7bd commit 0ee7991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibGUI/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Button : public AbstractButton {
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; }
Expand Down

0 comments on commit 0ee7991

Please sign in to comment.