mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
LibGUI: Rename Button
method set_mimic_pressed
=> mimic_pressed
This function does more things than a simple getter, so it's probably better to not use this notation. I also drop the parameter as it was always used with the same value.
This commit is contained in:
parent
c15a7b79ef
commit
96b3063121
4 changed files with 5 additions and 5 deletions
|
@ -144,7 +144,7 @@ void CalculatorWidget::set_entry(Crypto::BigFraction value)
|
|||
|
||||
void CalculatorWidget::mimic_pressed_button(RefPtr<GUI::Button> button)
|
||||
{
|
||||
button->set_mimic_pressed(true);
|
||||
button->mimic_pressed();
|
||||
}
|
||||
|
||||
void CalculatorWidget::update_display()
|
||||
|
|
|
@ -167,7 +167,7 @@ void Action::activate(Core::Object* activator)
|
|||
|
||||
if (activator == nullptr) {
|
||||
for_each_toolbar_button([](auto& button) {
|
||||
button.set_mimic_pressed(true);
|
||||
button.mimic_pressed();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -246,10 +246,10 @@ void Button::set_default(bool default_button)
|
|||
});
|
||||
}
|
||||
|
||||
void Button::set_mimic_pressed(bool mimic_pressed)
|
||||
void Button::mimic_pressed()
|
||||
{
|
||||
if (!is_being_pressed()) {
|
||||
m_mimic_pressed = mimic_pressed;
|
||||
m_mimic_pressed = true;
|
||||
|
||||
stop_timer();
|
||||
start_timer(80, Core::TimerShouldFireWhenNotVisible::Yes);
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
|
||||
bool another_button_has_focus() const { return m_another_button_has_focus; }
|
||||
|
||||
void set_mimic_pressed(bool mimic_pressed);
|
||||
void mimic_pressed();
|
||||
|
||||
virtual Optional<UISize> calculated_min_size() const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue