diff --git a/src/qml/Base/HAvatar.qml b/src/qml/Base/HAvatar.qml index 5c738423..951e2098 100644 --- a/src/qml/Base/HAvatar.qml +++ b/src/qml/Base/HAvatar.qml @@ -54,9 +54,8 @@ Rectangle { hoverEnabled: true } - ToolTip { + HToolTip { visible: imageMouseArea.containsMouse - delay: Qt.styleHints.mousePressAndHoldInterval HImage { id: avatarToolTipImage diff --git a/src/qml/Base/HToolTip.qml b/src/qml/Base/HToolTip.qml new file mode 100644 index 00000000..81478116 --- /dev/null +++ b/src/qml/Base/HToolTip.qml @@ -0,0 +1,13 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.0 + +ToolTip { + delay: Qt.styleHints.mousePressAndHoldInterval + + enter: Transition { + HNumberAnimation { property: "opacity"; from: 0.0; to: 1.0 } + } + exit: Transition { + HNumberAnimation { property: "opacity"; from: 1.0; to: 0.0 } + } +}