From 7e0226dd02bb0e22b19328961b7747bbc1d25cf8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 3 Jan 2021 17:24:02 +0100 Subject: LibVT: Show terminal hyperlink targets as tooltips This lets you see the target of a hyperlink before deciding to drag or double click it. --- Libraries/LibVT/TerminalWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Libraries') 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(); } -- cgit v1.2.3