mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGUI: Extend mimic pressed across keyboard shortcuts for buttons
Primary motivation for this was to get a visual indication in the browser for Ctrl-R refresh. This extends what ForLoveOfCats had done for calculator button shortcuts across all buttons with shortcuts. When an action is triggered without an activator each associated button will be set as mimic pressed.
This commit is contained in:
@@ -131,6 +131,12 @@ void Action::activate(Core::Object* activator)
|
||||
}
|
||||
}
|
||||
|
||||
if (activator == nullptr) {
|
||||
for_each_toolbar_button([](auto& button) {
|
||||
button.set_mimic_pressed(true);
|
||||
});
|
||||
}
|
||||
|
||||
on_activation(*this);
|
||||
m_activator = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user