mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
Calculator: Update mimic_pressed for refactor into the Button class
This commit is contained in:
parent
554709fec6
commit
0b5adfef8c
2 changed files with 0 additions and 18 deletions
|
@ -142,16 +142,7 @@ void CalculatorWidget::set_entry(KeypadValue value)
|
|||
|
||||
void CalculatorWidget::mimic_pressed_button(RefPtr<GUI::Button> button)
|
||||
{
|
||||
constexpr int TIMER_MS = 80;
|
||||
|
||||
if (!m_mimic_pressed_button.is_null())
|
||||
m_mimic_pressed_button->set_mimic_pressed(false);
|
||||
|
||||
button->set_mimic_pressed(true);
|
||||
m_mimic_pressed_button = button;
|
||||
|
||||
stop_timer();
|
||||
start_timer(TIMER_MS, Core::TimerShouldFireWhenNotVisible::Yes);
|
||||
}
|
||||
|
||||
void CalculatorWidget::update_display()
|
||||
|
@ -227,9 +218,3 @@ void CalculatorWidget::keydown_event(GUI::KeyEvent& event)
|
|||
|
||||
update_display();
|
||||
}
|
||||
|
||||
void CalculatorWidget::timer_event(Core::TimerEvent&)
|
||||
{
|
||||
if (!m_mimic_pressed_button.is_null())
|
||||
m_mimic_pressed_button->set_mimic_pressed(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue