Prevent avatar tooltip from going out of bound
This commit is contained in:
parent
eeca8b639d
commit
7e4cee31c7
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue
Block a user