mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibGUI: Propagate changing an action's text to its associated buttons
All other action state changes are already propagated to the action's buttons. Do the same for text.
This commit is contained in:
parent
234ae3a2ae
commit
4addad67d1
Notes:
sideshowbarker
2024-07-17 04:04:14 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/4addad67d1 Pull-request: https://github.com/SerenityOS/serenity/pull/16118
|
@ -275,6 +275,9 @@ void Action::set_text(String text)
|
|||
if (m_text == text)
|
||||
return;
|
||||
m_text = move(text);
|
||||
for_each_toolbar_button([&](auto& button) {
|
||||
button.set_text(m_text);
|
||||
});
|
||||
for_each_menu_item([&](auto& menu_item) {
|
||||
menu_item.update_from_action({});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue