Show long reaction text in tooltip
If the reaction text is elided, it will be shown in the tooltip.
This commit is contained in:
parent
a8734783cd
commit
b82b724795
1 changed files with 8 additions and 1 deletions
|
|
@ -33,12 +33,19 @@ Flow {
|
|||
implicitWidth: contentItem.childrenRect.width + contentItem.leftPadding * 2
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: modelData.users
|
||||
ToolTip.delay: Nheko.tooltipDelay
|
||||
onClicked: {
|
||||
console.debug("Picked " + modelData.key + "in response to " + reactionFlow.eventId + ". selfReactedEvent: " + modelData.selfReactedEvent);
|
||||
room.input.reaction(reactionFlow.eventId, modelData.key);
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ToolTip.text = Qt.binding(function() {
|
||||
if (textMetrics.elidedText === textMetrics.text) {
|
||||
return modelData.users;
|
||||
}
|
||||
return modelData.displayKey + "\n" + modelData.users;
|
||||
})
|
||||
}
|
||||
|
||||
contentItem: Row {
|
||||
anchors.centerIn: parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue