summary refs log tree commit diff
path: root/src/ui/NhekoGlobalObject.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-31 00:47:14 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-31 00:48:55 +0100
commit6f77a1fe9defeab40d90df82df238ef7dd2f906c (patch)
tree79f00ea0ef6e64864216aabc8c7227453225b09e /src/ui/NhekoGlobalObject.cpp
parentGet rid of some useless code (diff)
downloadnheko-6f77a1fe9defeab40d90df82df238ef7dd2f906c.tar.xz
Use the styles default delay for tooltips
This makes them less annoying when scrolling or accessing the popup
menu.

See also #860
Diffstat (limited to 'src/ui/NhekoGlobalObject.cpp')
-rw-r--r--src/ui/NhekoGlobalObject.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp

index bc578476..e6869639 100644 --- a/src/ui/NhekoGlobalObject.cpp +++ b/src/ui/NhekoGlobalObject.cpp
@@ -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 {