linphone-desktop/linphone-app/ui/views/App/Calls/IncallAvatar.qml
Julien Wadel 59c2ba9f11 * UTF8 fixes and display names behavior:
- Avoid to replace display if empty on address books search
- Propagate change when display name is set in callModel
- Add a way to update addresses when data model change outside of ChatRoomModel
- While calling and one participant, get display name from call remote address
- Update display names after adding a call log
- Fix UTF8 when compute display name
- Replace JS display name functions by CPP

* Fix tooltips width and timeline unexistant object
* MSYS2 bzip2 may block the process execution when no arguments. Add help args and remove outputs from streams.
2021-10-18 19:26:20 +02:00

44 lines
1.2 KiB
QML

import QtQuick 2.7
import Linphone 1.0
import LinphoneUtils 1.0
import UtilsCpp 1.0
import App.Styles 1.0
// =============================================================================
Avatar {
property var call
readonly property var _sipAddressObserver: SipAddressesModel.getSipAddressObserver(call.fullPeerAddress, call.fullLocalAddress)
readonly property var _username: UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress)
backgroundColor: CallStyle.container.avatar.backgroundColor
foregroundColor: call.status === CallModel.CallStatusPaused
? CallStyle.container.pause.color
: 'transparent'
image: {
var contact = _sipAddressObserver.contact
return contact && contact.vcard.avatar
}
username: call.status === CallModel.CallStatusPaused ? '' : _username
Text {
anchors.fill: parent
color: CallStyle.container.pause.text.color
// `|| 1` => `pointSize` must be greater than 0.
font.pointSize: (width / CallStyle.container.pause.text.pointSizeFactor) || 1
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: '❙❙'
textFormat: Text.RichText
visible: call.status === CallModel.CallStatusPaused
}
}