Fix avatar and username letter.

Fix persistent camera.
This commit is contained in:
Julien Wadel 2022-04-27 14:38:25 +02:00
parent ffc2b3abca
commit 19ad53d654
9 changed files with 25 additions and 20 deletions

View file

@ -10,18 +10,17 @@ import App.Styles 1.0
// =============================================================================
Avatar {
id: mainItem
property var call
property var participantDeviceModel
readonly property var _sipAddressObserver: call ? SipAddressesModel.getSipAddressObserver(call.fullPeerAddress, call.fullLocalAddress)
: participantDeviceModel ? SipAddressesModel.getSipAddressObserver(participantDeviceModel.address, '')
: null
readonly property var _username: _sipAddressObserver ? UtilsCpp.getDisplayName(_sipAddressObserver.peerAddress) : ''
property bool isPaused: (call && (call.status === CallModel.CallStatusPaused)) || (participantDeviceModel && participantDeviceModel.isPaused)
backgroundColor: CallStyle.container.avatar.backgroundColor
foregroundColor: call && call.status === CallModel.CallStatusPaused
? CallStyle.container.pause.color
: 'transparent'
foregroundColor: mainItem.isPaused ? CallStyle.container.pause.color : 'transparent'
image: {
if (_sipAddressObserver) {
@ -31,8 +30,8 @@ Avatar {
return null;
}
username: call && (call.status === CallModel.CallStatusPaused) || !_username? '' : _username
username: (mainItem.isPaused || !_username) ? '' : _username
onUsernameChanged: console.log(username)
Text {
anchors.fill: parent
color: CallStyle.container.pause.text.color
@ -45,6 +44,6 @@ Avatar {
text: '❙❙'
textFormat: Text.RichText
visible: call && (call.status === CallModel.CallStatusPaused) || false
visible: mainItem.isPaused
}
}

View file

@ -21,9 +21,7 @@ Item {
property bool isFullscreen: false
property bool hideCamera: false //callModel.pausedByUser
property bool isPaused: false
property bool isVideoEnabled: enabled && (!container.currentDevice || (container.currentDevice && container.currentDevice.videoEnabled))
function resetActive(){
resetTimer.resetActive()
}

View file

@ -48,7 +48,7 @@ Item{
CameraItem{
id: camera
anchors.fill: parent
visible: false
visible: true
}
OpacityMask{
id: renderedCamera

View file

@ -20,7 +20,6 @@ Item {
property var _initialsRegex: /^\s*([^\s\.]+)(?:[\s\.]+([^\s\.]+))?/
//onPresenceLevelChanged: console.log(Presence.getPresenceLevelIconName(presenceLevel)+' => '+username)
// ---------------------------------------------------------------------------
function isLoaded () {
@ -29,9 +28,8 @@ Item {
function _computeInitials () {
var result = username.match(_initialsRegex)
if (!result) {
return ''
return username.length > 0 ? username.charAt(0).toUpperCase() : ''
}
return result[1].charAt(0).toUpperCase() + (

View file

@ -44,7 +44,6 @@ function handleClosing (close) {
window.close()
}
})
close.accepted = false
}

View file

@ -33,6 +33,7 @@ Window {
});
*/
property ConferenceInfoModel conferenceInfoModel
readonly property bool chatIsOpened: !rightPaned.isClosed()
readonly property bool callsIsOpened: !mainPaned.isClosed()
@ -70,7 +71,6 @@ Window {
title: qsTr('callsTitle')
// ---------------------------------------------------------------------------
onClosing: Logic.handleClosing(close)
onDetachedVirtualWindow: Logic.tryToCloseWindow()
@ -254,6 +254,7 @@ Window {
WaitingRoom{
conferenceInfoModel: window.conferenceInfoModel
onCancel: endOfProcess(0)
enabled: window.visible
}
}
Component {
@ -262,6 +263,7 @@ Window {
callModel: window.call
listCallsOpened: window.callsIsOpened
onOpenListCallsRequest: mainPaned.open()
enabled: window.visible
}
}

View file

@ -18,7 +18,7 @@ Rectangle {
signal cancel()
function close(){
loader.active = false
previewLoader.enabled = false
}
function open(){
}
@ -34,12 +34,11 @@ Rectangle {
font.pointSize: WaitingRoomStyle.title.pointSize
horizontalAlignment: Qt.AlignCenter
}
Loader{
Item{
id: loader
Layout.fillWidth: true
Layout.fillHeight: true
sourceComponent: Component{
CameraView{
id: previewLoader
showCloseButton: false
@ -48,7 +47,6 @@ Rectangle {
width : height
}
}
}
// -------------------------------------------------------------------------
// Action Buttons.
// -------------------------------------------------------------------------

View file

@ -31,6 +31,12 @@ ColumnLayout {
anchors.leftMargin: 40
color: ConferencesStyle.bar.text.color
font {
bold: true
pointSize: ConferencesStyle.bar.text.pointSize
}
text: 'Mes conférences'
}
}

View file

@ -20,6 +20,11 @@ QtObject {
property int height: 60
property int leftMargin: 18
property int rightMargin: 18
property QtObject text: QtObject {
property int pointSize: Units.dp * 11
property color color: ColorsList.add(sectionName+'_bar_text', 'j').color
}
}
property QtObject conference: QtObject {