1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:17:34 +00:00

LibGUI: Mimic a user click when calling Button::click()

The `mimic_pressed` function was primarily used in one place, the
Calculator. This patch removes quite a lot of logic duplication there.
It is also profitable to a lot of other places where `click()` was
called without mimicking a click.
This commit is contained in:
Lucas CHOLLET 2023-01-17 17:31:45 -05:00 committed by Andreas Kling
parent 96b3063121
commit d4ef2e226c
5 changed files with 37 additions and 54 deletions

View file

@ -33,7 +33,6 @@ private:
void add_operation_button(GUI::Button&, Calculator::Operation);
void add_digit_button(GUI::Button&, int digit);
void mimic_pressed_button(RefPtr<GUI::Button>);
void perform_operation(Calculator::Operation operation);
void update_display();