diff --git a/Ladybird/BrowserWindow.cpp b/Ladybird/BrowserWindow.cpp index 553b1d037e..e4e78e24ed 100644 --- a/Ladybird/BrowserWindow.cpp +++ b/Ladybird/BrowserWindow.cpp @@ -10,7 +10,6 @@ #include #include #include -#include extern String s_serenity_resource_root; diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp index eb37d2388e..bc24670b86 100644 --- a/Ladybird/Tab.cpp +++ b/Ladybird/Tab.cpp @@ -9,7 +9,8 @@ #include "BrowserWindow.h" #include "History.h" #include -#include +#include +#include extern String s_serenity_resource_root; @@ -48,8 +49,13 @@ Tab::Tab(QMainWindow* window) m_toolbar->addAction(m_home_action); m_toolbar->addWidget(m_location_edit); - QObject::connect(m_view, &WebView::linkHovered, m_window->statusBar(), &QStatusBar::showMessage); - QObject::connect(m_view, &WebView::linkUnhovered, m_window->statusBar(), &QStatusBar::clearMessage); + QObject::connect(m_view, &WebView::linkHovered, [this](QString const& title) { + const QPoint* pos = new QPoint(0, size().height() - 15); + QToolTip::showText(*pos, title, this); + }); + QObject::connect(m_view, &WebView::linkUnhovered, [this] { + QToolTip::hideText(); + }); QObject::connect(m_view, &WebView::loadStarted, [this](const URL& url) { m_location_edit->setText(url.to_string().characters());