mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibVT: Show terminal hyperlink targets as tooltips
This lets you see the target of a hyperlink before deciding to drag or double click it.
This commit is contained in:
parent
347e5aa7b5
commit
7e0226dd02
1 changed files with 4 additions and 0 deletions
|
@ -825,6 +825,8 @@ void TerminalWidget::mousemove_event(GUI::MouseEvent& event)
|
||||||
m_hovered_href_id = {};
|
m_hovered_href_id = {};
|
||||||
m_hovered_href = {};
|
m_hovered_href = {};
|
||||||
}
|
}
|
||||||
|
set_tooltip(m_hovered_href);
|
||||||
|
show_or_hide_tooltip();
|
||||||
if (!m_hovered_href.is_empty())
|
if (!m_hovered_href.is_empty())
|
||||||
set_override_cursor(Gfx::StandardCursor::Arrow);
|
set_override_cursor(Gfx::StandardCursor::Arrow);
|
||||||
else
|
else
|
||||||
|
@ -877,6 +879,8 @@ void TerminalWidget::leave_event(Core::Event&)
|
||||||
bool should_update = !m_hovered_href.is_empty();
|
bool should_update = !m_hovered_href.is_empty();
|
||||||
m_hovered_href = {};
|
m_hovered_href = {};
|
||||||
m_hovered_href_id = {};
|
m_hovered_href_id = {};
|
||||||
|
set_tooltip(m_hovered_href);
|
||||||
|
set_override_cursor(Gfx::StandardCursor::IBeam);
|
||||||
if (should_update)
|
if (should_update)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue