From fb4da2587e7dac6413dbfe432ee6062c286e783b Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Fri, 21 Jan 2022 10:36:20 +0100 Subject: [PATCH] Info group : show participant address on avatar click instead of all line, that allows address selection. --- .../ui/modules/Linphone/Contact/Contact.qml | 6 +++++- .../Linphone/View/ParticipantsView.qml | 9 +++------ .../views/App/Main/Dialogs/InfoChatRoom.qml | 19 ++----------------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/linphone-app/ui/modules/Linphone/Contact/Contact.qml b/linphone-app/ui/modules/Linphone/Contact/Contact.qml index 9d4125670..fb996b8ae 100644 --- a/linphone-app/ui/modules/Linphone/Contact/Contact.qml +++ b/linphone-app/ui/modules/Linphone/Contact/Contact.qml @@ -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 diff --git a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml index ffb4a9869..52e8ab242 100644 --- a/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml +++ b/linphone-app/ui/modules/Linphone/View/ParticipantsView.qml @@ -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 diff --git a/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml b/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml index 72011e6d2..ea30e0823 100644 --- a/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml +++ b/linphone-app/ui/views/App/Main/Dialogs/InfoChatRoom.qml @@ -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 } } }