Revert "LibGUI: Update buttons' text/tooltips in Action::set_text"

This reverts commit e20756f9f7.

Some buttons, e.g. GUI::ToolbarButton, set text to be used only as a
tooltip instead of text on the button itself. This commit forced those
buttons to have text on them when their action became set. For most
toolbars, this was an invisible side effect; the button icons covered
the whole button rect. But the toolbar for EmojiInputDialog has slightly
smaller icons, causing an ellipsis to be displayed next to the icon.
This commit is contained in:
Timothy Flynn 2022-11-19 09:08:09 -05:00 committed by Andreas Kling
commit 62cbfc68b9
Notes: sideshowbarker 2024-07-17 11:06:06 +09:00
4 changed files with 12 additions and 23 deletions

View file

@ -275,9 +275,6 @@ void Action::set_text(String text)
if (m_text == text)
return;
m_text = move(text);
for_each_toolbar_button([&](auto& button) {
button.set_text_from_action();
});
for_each_menu_item([&](auto& menu_item) {
menu_item.update_from_action({});
});