mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Userland: Port GUI::Application::show_tooltip() to String
This most importantly gets rid of a chain of "String to DeprecatedString to String" transformations when setting a tooltip from GUI::Widget's set_tooltip function.
This commit is contained in:
parent
16defb4806
commit
a3ddba4191
7 changed files with 12 additions and 12 deletions
|
@ -74,7 +74,7 @@ void GuideTool::on_mousedown(Layer*, MouseEvent& event)
|
|||
|
||||
if (m_selected_guide) {
|
||||
m_guide_origin = m_selected_guide->offset();
|
||||
GUI::Application::the()->show_tooltip_immediately(DeprecatedString::formatted("{}", m_guide_origin), GUI::Application::the()->tooltip_source_widget());
|
||||
GUI::Application::the()->show_tooltip_immediately(MUST(String::number(m_guide_origin)), GUI::Application::the()->tooltip_source_widget());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ void GuideTool::on_mousemove(Layer*, MouseEvent& event)
|
|||
|
||||
m_selected_guide->set_offset(new_offset);
|
||||
|
||||
GUI::Application::the()->show_tooltip_immediately(DeprecatedString::formatted("{}", new_offset), GUI::Application::the()->tooltip_source_widget());
|
||||
GUI::Application::the()->show_tooltip_immediately(MUST(String::number(new_offset)), GUI::Application::the()->tooltip_source_widget());
|
||||
|
||||
editor()->update();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue