mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Userland: Set Button text using the new String class
This commit is contained in:
parent
b5cb9a9ebb
commit
e39adc4772
49 changed files with 134 additions and 127 deletions
|
@ -56,18 +56,18 @@ private:
|
|||
if (action.icon())
|
||||
set_icon(action.icon());
|
||||
else
|
||||
set_text_deprecated(action.text());
|
||||
set_text(String::from_deprecated_string(action.text()).release_value_but_fixme_should_propagate_errors());
|
||||
set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
}
|
||||
|
||||
virtual void set_text_deprecated(DeprecatedString text) override
|
||||
virtual void set_text(String text) override
|
||||
{
|
||||
auto const* action = this->action();
|
||||
VERIFY(action);
|
||||
|
||||
set_tooltip(tooltip(*action));
|
||||
if (!action->icon())
|
||||
Button::set_text_deprecated(move(text));
|
||||
Button::set_text(move(text));
|
||||
}
|
||||
|
||||
DeprecatedString tooltip(Action const& action) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue