From 27823b267532c440e594dea05a455889772601a0 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 1 Aug 2021 08:10:27 +0200 Subject: [PATCH] Fix URL tooltip position on screen --- src/zimview.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/zimview.cpp b/src/zimview.cpp index 93e79c2..40b0b7a 100644 --- a/src/zimview.cpp +++ b/src/zimview.cpp @@ -79,9 +79,7 @@ ZimView::ZimView(TabBar *tabBar, QWidget *parent) * we can be sure the current tab is a web page * (mp_tabBar->currentWebView() is not nullptr) */ - auto height = mp_tabBar->currentWebView()->height() + 1; - - auto pos = mp_tabBar->mapToGlobal(QPoint(-3, height)); + auto pos = mp_tabBar->mapToGlobal(QPoint(-3, mp_tabBar->currentWebView()->height() - mp_tabBar->PdmHeightMM + 2)); QToolTip::showText(pos, link); } });