1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibVT: Show application display name when hovered over, if available

Fixes #14416.
This commit is contained in:
Wuzado 2022-07-12 17:01:52 +02:00 committed by Andreas Kling
parent 0d6dc74951
commit d3cffcfee5

View file

@ -833,10 +833,12 @@ void TerminalWidget::mousemove_event(GUI::MouseEvent& event)
if (!handlers.is_empty()) {
auto path = URL(attribute.href).path();
auto name = LexicalPath::basename(path);
if (path == handlers[0])
if (path == handlers[0]) {
set_tooltip(String::formatted("Execute {}", name));
else
set_tooltip(String::formatted("Open {} with {}", name, LexicalPath::basename(handlers[0])));
} else {
auto af = Desktop::AppFile::get_for_app(LexicalPath::basename(handlers[0]));
set_tooltip(String::formatted("Open {} with {}", name, af->is_valid() ? af->name() : LexicalPath::basename(handlers[0])));
}
}
} else {
m_hovered_href_id = {};