Use the styles default delay for tooltips

This makes them less annoying when scrolling or accessing the popup
menu.

See also #860
This commit is contained in:
Nicolas Werner 2021-12-31 00:47:14 +01:00
parent 750c64f323
commit 6f77a1fe9d
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
7 changed files with 32 additions and 1 deletions

View file

@ -4,7 +4,9 @@
#include "NhekoGlobalObject.h"
#include <QApplication>
#include <QDesktopServices>
#include <QStyle>
#include <QUrl>
#include <QWindow>
@ -75,6 +77,12 @@ Nheko::theme() const
return Theme(UserSettings::instance()->theme());
}
int
Nheko::tooltipDelay() const
{
return QApplication::style()->styleHint(QStyle::StyleHint::SH_ToolTip_WakeUpDelay);
}
void
Nheko::openLink(QString link) const
{