mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
LibVT: Show application display name when hovered over, if available
Fixes #14416.
This commit is contained in:
parent
0d6dc74951
commit
d3cffcfee5
1 changed files with 5 additions and 3 deletions
|
@ -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 = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue