mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-23 00:45:29 +02:00
SwarmDetailsPanel: contextMenu opens to wrong position
GitLab: #971 Change-Id: Id9c20660a57c677a137dbdaf54e8ee4b28eb3c02
This commit is contained in:
parent
e763f78866
commit
049cb4583a
1 changed files with 13 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue