diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-03 17:24:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-03 17:25:06 +0100 |
commit | 7e0226dd02bb0e22b19328961b7747bbc1d25cf8 (patch) | |
tree | 0d38657adfc28addedb8f28d297968978426e457 /Libraries | |
parent | 347e5aa7b588f3f2f21f11cd5f2b07f80a7819a1 (diff) | |
download | serenity-7e0226dd02bb0e22b19328961b7747bbc1d25cf8.zip |
LibVT: Show terminal hyperlink targets as tooltips
This lets you see the target of a hyperlink before deciding to drag or
double click it.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibVT/TerminalWidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibVT/TerminalWidget.cpp b/Libraries/LibVT/TerminalWidget.cpp index 4e55c05656..c1509cea36 100644 --- a/Libraries/LibVT/TerminalWidget.cpp +++ b/Libraries/LibVT/TerminalWidget.cpp @@ -825,6 +825,8 @@ void TerminalWidget::mousemove_event(GUI::MouseEvent& event) m_hovered_href_id = {}; m_hovered_href = {}; } + set_tooltip(m_hovered_href); + show_or_hide_tooltip(); if (!m_hovered_href.is_empty()) set_override_cursor(Gfx::StandardCursor::Arrow); else @@ -877,6 +879,8 @@ void TerminalWidget::leave_event(Core::Event&) bool should_update = !m_hovered_href.is_empty(); m_hovered_href = {}; m_hovered_href_id = {}; + set_tooltip(m_hovered_href); + set_override_cursor(Gfx::StandardCursor::IBeam); if (should_update) update(); } |