Info group : show participant address on avatar click instead of all line, that allows address selection.

This commit is contained in:
Julien Wadel 2022-01-21 10:36:20 +01:00
parent fa7925c4a2
commit fb4da2587e
3 changed files with 10 additions and 24 deletions

View file

@ -33,7 +33,7 @@ Rectangle {
:entry.username != undefined ?entry.username:
UtilsCpp.getDisplayName(entry.sipAddress || entry.fullPeerAddress || entry.peerAddress || '')
):'')
signal avatarClicked(var mouse)
// ---------------------------------------------------------------------------
color: 'transparent' // No color by default.
@ -86,6 +86,10 @@ Rectangle {
icon: entry?(entry.securityLevel === 2?'secure_level_1': entry.securityLevel===3? 'secure_level_2' : 'secure_level_unsafe'):'secure_level_unsafe'
iconSize:15
}
MouseArea{
anchors.fill: parent
onClicked: item.avatarClicked(mouse)
}
}
Icon {
id: groupChat

View file

@ -44,7 +44,7 @@ ScrollableListView {
// ---------------------------------------------------------------------------
signal entryClicked (var entry, var index)
signal entryClicked (var entry, var index, var contactItem)
// ---------------------------------------------------------------------------
@ -244,11 +244,8 @@ ScrollableListView {
entry: modelData
MouseArea {
anchors.fill: parent
onClicked: sipAddressesView.entryClicked(parent.entry, index)
cursorShape: sipAddressesView.hoveredCursor
}
onAvatarClicked: sipAddressesView.entryClicked(parent.entry, index, contactView)
BusyIndicator{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter

View file

@ -175,23 +175,8 @@ DialogPlus {
}
onEntryClicked: {//actions[0].handler(entry)
if(tooltip.delay>0) {
tooltip.oldDelay = tooltip.delay
tooltip.delay = 0
}
tooltip.show(entry.sipAddress, -1);
}
ToolTip{
id:tooltip
property int oldDelay : 0
MouseArea{
anchors.fill:parent
onClicked : {
tooltip.hide()
tooltip.delay = tooltip.oldDelay
}
}
onEntryClicked: {
contactItem.showContactAddress = !contactItem.showContactAddress
}
}
}