mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibGUI: Allow overriding toolbar button tooltips
The EmojiInputDialog, for example, will want its toolbar buttons to have a tooltip which differs from its text. If no tooltip override has been provided, we fall back to the button text still.
This commit is contained in:
parent
f8a0365002
commit
153218ed76
3 changed files with 18 additions and 1 deletions
|
@ -71,7 +71,7 @@ private:
|
|||
DeprecatedString tooltip(Action const& action) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(action.text());
|
||||
builder.append(action.tooltip());
|
||||
if (action.shortcut().is_valid()) {
|
||||
builder.append(" ("sv);
|
||||
builder.append(action.shortcut().to_deprecated_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue