Commit 1dce1fef authored by Ronan's avatar Ronan

fix(ui/views/App/Calls/Incall): remove letters when call is paused on avatar

parent 98af40d8
......@@ -370,6 +370,7 @@
<file>ui/views/App/Calls/Dialogs/CallTransfer.qml</file>
<file>ui/views/App/Calls/Dialogs/ConferenceManager.qml</file>
<file>ui/views/App/Calls/EndedCall.qml</file>
<file>ui/views/App/Calls/IncallAvatar.qml</file>
<file>ui/views/App/Calls/IncallFullscreenWindow.qml</file>
<file>ui/views/App/Calls/Incall.js</file>
<file>ui/views/App/Calls/Incall.qml</file>
......
......@@ -135,7 +135,7 @@ Rectangle {
username: LinphoneUtils.getContactUsername(parent.sipAddressObserver.contact || parent.sipAddress)
}
Avatar {
IncallAvatar {
readonly property int size: Math.min(
parent.width,
parent.height - contactDescription.height - parent.spacing
......@@ -143,29 +143,20 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
call: $call
height: size
width: size
backgroundColor: CallStyle.container.avatar.backgroundColor
foregroundColor: $call && $call.status === CallModel.CallStatusPaused
? CallStyle.container.pause.color
: 'transparent'
image: {
var contact = parent.sipAddressObserver.contact
if (contact) {
return contact.vcard.avatar
BusyIndicator {
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
}
username: contactDescription.username
BusyIndicator {
color: CallStyle.header.busyIndicator.color
height: CallStyle.header.busyIndicator.height
width: CallStyle.header.busyIndicator.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: $call && $call.status === CallModel.CallStatusOutgoing
}
......
......@@ -200,31 +200,11 @@ Rectangle {
Component {
id: avatar
Avatar {
backgroundColor: CallStyle.container.avatar.backgroundColor
foregroundColor: incall.call.status === CallModel.CallStatusPaused
? CallStyle.container.pause.color
: 'transparent'
image: _sipAddressObserver.contact && _sipAddressObserver.contact.vcard.avatar
username: contactDescription.username
IncallAvatar {
call: incall.call
height: Logic.computeAvatarSize(CallStyle.container.avatar.maxSize)
width: height
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: '&#9616;&nbsp;&#9612;'
textFormat: Text.RichText
visible: incall.call.status === CallModel.CallStatusPaused
}
}
}
......
import QtQuick 2.7
import Linphone 1.0
import LinphoneUtils 1.0
import App.Styles 1.0
// =============================================================================
Avatar {
property var call
readonly property var _sipAddressObserver: SipAddressesModel.getSipAddressObserver(call.sipAddress)
readonly property var _username: LinphoneUtils.getContactUsername(_sipAddressObserver.contact || call.sipAddress)
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: '&#9616;&nbsp;&#9612;'
textFormat: Text.RichText
visible: call.status === CallModel.CallStatusPaused
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment