Merge pull request #672 from kiwix/fix-url-qtooltip

Fix URL tooltip position on screen
This commit is contained in:
Kelson 2021-08-01 08:16:58 +02:00 committed by GitHub
commit 93db182c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,9 +79,7 @@ ZimView::ZimView(TabBar *tabBar, QWidget *parent)
* we can be sure the current tab is a web page * we can be sure the current tab is a web page
* (mp_tabBar->currentWebView() is not nullptr) * (mp_tabBar->currentWebView() is not nullptr)
*/ */
auto height = mp_tabBar->currentWebView()->height() + 1; auto pos = mp_tabBar->mapToGlobal(QPoint(-3, mp_tabBar->currentWebView()->height() - mp_tabBar->PdmHeightMM + 2));
auto pos = mp_tabBar->mapToGlobal(QPoint(-3, height));
QToolTip::showText(pos, link); QToolTip::showText(pos, link);
} }
}); });