diff --git a/src/qml/Base/HAvatar.qml b/src/qml/Base/HAvatar.qml index 951e2098..aefe07a5 100644 --- a/src/qml/Base/HAvatar.qml +++ b/src/qml/Base/HAvatar.qml @@ -55,12 +55,17 @@ Rectangle { } HToolTip { + id: avatarToolTip visible: imageMouseArea.containsMouse + width: 128 + height: 128 HImage { id: avatarToolTipImage - sourceSize.width: 128 - sourceSize.height: 128 + sourceSize.width: avatarToolTip.width + sourceSize.height: avatarToolTip.height + width: sourceSize.width + height: sourceSize.height } } } diff --git a/src/qml/Base/HToolTip.qml b/src/qml/Base/HToolTip.qml index 81478116..cc729aed 100644 --- a/src/qml/Base/HToolTip.qml +++ b/src/qml/Base/HToolTip.qml @@ -2,7 +2,12 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 ToolTip { + // Be sure to have a width and height set, to prevent the tooltip from + // going out of the window's boundaries + + id: toolTip delay: Qt.styleHints.mousePressAndHoldInterval + padding: 0 enter: Transition { HNumberAnimation { property: "opacity"; from: 0.0; to: 1.0 }