From ba92917ac2f32e6fa7c8e5c3ecbd6a36b2e79eb0 Mon Sep 17 00:00:00 2001 From: Piotr Henryk Dabrowski Date: Sat, 3 Aug 2019 15:28:35 +0200 Subject: [Dolphin] Hide tooltip instantly on key press Summary: Instantly hide tooltip shown over an element when a key is pressed. Currently, when pressing an alphanum key to select a different file, the tooltip continues to cover much of the window - often hiding that newly selected file from view. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: broulik, elvisangelaccio, kfm-devel, pdabrowski Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22512 --- src/views/tooltips/tooltipmanager.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/views/tooltips/tooltipmanager.h') diff --git a/src/views/tooltips/tooltipmanager.h b/src/views/tooltips/tooltipmanager.h index 10f88ad76..c09a40d31 100644 --- a/src/views/tooltips/tooltipmanager.h +++ b/src/views/tooltips/tooltipmanager.h @@ -42,6 +42,11 @@ class ToolTipManager : public QObject Q_OBJECT public: + enum class HideBehavior { + Instantly, + Later + }; + explicit ToolTipManager(QWidget* parent); ~ToolTipManager() override; @@ -56,7 +61,7 @@ public: /** * Hides the currently shown tooltip. */ - void hideToolTip(); + void hideToolTip(const HideBehavior behavior = HideBehavior::Later); signals: /** -- cgit v1.3