Consistently define the tooltip delay

Summary: Set the right value on the Kirigami.Units and use it from tooltip.

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25918
This commit is contained in:
Aleix Pol 2019-12-12 13:05:44 +01:00
parent c5a3d7cd54
commit c33fcaa8d7
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ QtObject {
*/
property int wheelScrollLines: 3
property int toolTipDelay: 700
property int toolTipDelay: Kirigami.Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 700
/**
* metrics used by the default font

View File

@ -30,7 +30,7 @@ T.ToolTip {
y: -implicitHeight - 3
visible: parent && (Kirigami.Settings.tabletMode ? parent.pressed : parent.hovered)
delay: Kirigami.Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 1000
delay: Kirigami.Units.toolTipDelay
timeout: 5000
implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding