Skip to content
Snippets Groups Projects
Commit 049cb458 authored by Nicolas Vengeon's avatar Nicolas Vengeon
Browse files

SwarmDetailsPanel: contextMenu opens to wrong position

GitLab: #971

Change-Id: Id9c20660a57c677a137dbdaf54e8ee4b28eb3c02
parent e763f788
No related branches found
No related tags found
No related merge requests found
......@@ -604,13 +604,14 @@ Rectangle {
model: CurrentConversation.uris
delegate: ItemDelegate {
id: member
width: members.width
height: JamiTheme.smartListItemHeight
background: Rectangle {
anchors.fill: parent
color: {
if (member.hovered)
if (member.hovered || nameTextEditHover.hovered)
return Qt.darker(JamiTheme.selectedColor, 1.05)
else
return "transparent"
......@@ -618,11 +619,14 @@ Rectangle {
}
MouseArea {
id: memberMouseArea
anchors.fill: parent
enabled: modelData != CurrentAccount.uri
enabled: modelData !== CurrentAccount.uri
acceptedButtons: Qt.RightButton
onClicked: function (mouse) {
contextMenu.openMenuAt(x + mouse.x, y + mouse.y, modelData)
var position = mapToItem(members, mouse.x, mouse.y)
contextMenu.openMenuAt(position.x, position.y, modelData)
}
}
......@@ -648,7 +652,7 @@ Rectangle {
}
ElidedTextLabel {
id: bestName
id: nameTextEdit
Layout.preferredHeight: JamiTheme.preferredFieldHeight
Layout.topMargin: JamiTheme.preferredMarginSize / 2
......@@ -663,9 +667,14 @@ Rectangle {
var role = UtilsAdapter.getParticipantRole(CurrentAccount.id, CurrentConversation.id, modelData)
return role === Member.Role.INVITED ? 0.5 : 1
}
font.kerning: true
verticalAlignment: Text.AlignVCenter
HoverHandler {
id: nameTextEditHover
}
}
ElidedTextLabel {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment