mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGUI+Userland: Port Labels to String
This commit is contained in:
parent
3d53dc8228
commit
91bafc2653
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/thankyouverycool
Commit: 91bafc2653
Pull-request: https://github.com/SerenityOS/serenity/pull/18573
92 changed files with 240 additions and 242 deletions
|
@ -19,7 +19,7 @@ REGISTER_WIDGET(GUI, LinkLabel)
|
|||
|
||||
namespace GUI {
|
||||
|
||||
LinkLabel::LinkLabel(DeprecatedString text)
|
||||
LinkLabel::LinkLabel(String text)
|
||||
: Label(move(text))
|
||||
{
|
||||
set_foreground_role(Gfx::ColorRole::Link);
|
||||
|
@ -102,7 +102,7 @@ void LinkLabel::did_change_text()
|
|||
void LinkLabel::update_tooltip_if_needed()
|
||||
{
|
||||
if (width() < font().width(text())) {
|
||||
set_tooltip(text());
|
||||
set_tooltip(text().to_deprecated_string());
|
||||
} else {
|
||||
set_tooltip({});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue