Fix avatar tooltips

This commit is contained in:
miruka 2019-09-12 19:54:31 -04:00
parent 2a7ed6143d
commit fcdd960779
2 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,6 @@
- When qml syntax highlighting supports ES6 string interpolation, use that
- Fixes
- Image tooltips
- Time on their own lines
- When selecting text and scrolling up, selection stops working after a while
- Ensure all the text that should be copied is copied

View File

@ -57,22 +57,23 @@ Rectangle {
HToolTip {
id: avatarToolTip
visible: toolTipImageUrl && hoverHandler.hovered
width: Math.min(
delay: 1000
readonly property int dimension: Math.min(
mainUI.width / 1.25,
mainUI.height / 1.25,
theme.controls.avatar.hoveredSize + background.border.width * 2
)
height: width
delay: 1000
HImage {
contentItem: HImage {
id: avatarToolTipImage
sourceSize.width: parent.width
sourceSize.height: parent.height
width: sourceSize.width
height: sourceSize.width
fillMode: Image.PreserveAspectCrop
source: Qt.resolvedUrl(toolTipImageUrl)
sourceSize.width: avatarToolTip.dimension
sourceSize.height: avatarToolTip.dimension
width: avatarToolTip.dimension
height: avatarToolTip.dimension
}
}
}