diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index e2a0d71d1..c1592ec0b 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -1133,6 +1133,14 @@ Server url ikke konfigureret. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ Server url ikke konfigureret. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 66722d3a3..70311c548 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -1133,6 +1133,14 @@ Server URL ist nicht konfiguriert. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ Server URL ist nicht konfiguriert. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index f15b754f0..f872bbf16 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -1133,6 +1133,14 @@ Server URL not configured. Select date and time + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + paused + + DroppableTextArea @@ -1385,6 +1393,11 @@ Server URL not configured. 'Waiting for another participant...' : Waiting message for more participant. Waiting for another participant... + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + You are alone in this conference + IncallFullscreen diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 149ca8ef1..35dccc2e8 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -1133,6 +1133,14 @@ URL del servidor no configurada. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ URL del servidor no configurada. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index c9637bb18..c5b3ade61 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -1133,6 +1133,14 @@ URL du serveur non configurée. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ URL du serveur non configurée. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 823bf3a92..64a85a952 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -1127,6 +1127,14 @@ A kiszolgáló URL-je nincs konfigurálva. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1375,6 +1383,11 @@ A kiszolgáló URL-je nincs konfigurálva. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index db8e3825c..621b894e7 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -1133,6 +1133,14 @@ URL del server non configurato. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ URL del server non configurato. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 6ee61d20a..c1e7a275a 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -1127,6 +1127,14 @@ + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1375,6 +1383,11 @@ 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index c986cd660..038a739db 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -1139,6 +1139,14 @@ Nesukonfigūruotas serverio url. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1395,6 +1403,11 @@ Nesukonfigūruotas serverio url. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 0a2d54314..ee3949804 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -1133,6 +1133,14 @@ URL do servidor não configurado. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ URL do servidor não configurado. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index 93df74484..ffaa66287 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -1139,6 +1139,14 @@ + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1395,6 +1403,11 @@ 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 8bff184ca..698794c15 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -1133,6 +1133,14 @@ Serverwebbadressen är inte konfigurerad. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1385,6 +1393,11 @@ Serverwebbadressen är inte konfigurerad. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 218a91244..302b3a452 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -1127,6 +1127,14 @@ Sunucu url'si yapılandırılmadı. + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1375,6 +1383,11 @@ Sunucu url'si yapılandırılmadı. 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index a085a5b1b..f0407b205 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -1139,6 +1139,14 @@ + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1395,6 +1403,11 @@ 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index f91605462..51a5c29b4 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -1127,6 +1127,14 @@ + + DecorationSticker + + paused + 'paused' : Pause state on sticker, next to username. + + + DroppableTextArea @@ -1375,6 +1383,11 @@ 'Waiting for another participant...' : Waiting message for more participant. + + aloneInConference + ''You are alone in this conference' : Text in message banner when the user is the only participant. + + IncallFullscreen diff --git a/linphone-app/src/components/conference/ConferenceModel.cpp b/linphone-app/src/components/conference/ConferenceModel.cpp index 2b054ef12..7a884df5b 100644 --- a/linphone-app/src/components/conference/ConferenceModel.cpp +++ b/linphone-app/src/components/conference/ConferenceModel.cpp @@ -63,6 +63,8 @@ ConferenceModel::ConferenceModel (std::shared_ptr conferen mConferenceListener = std::make_shared(); connectTo(mConferenceListener.get()); mConference->addListener(mConferenceListener); + connect(this, &ConferenceModel::participantDeviceAdded, this, &ConferenceModel::participantDeviceCountChanged); + connect(this, &ConferenceModel::participantDeviceRemoved, this, &ConferenceModel::participantDeviceCountChanged); } ConferenceModel::~ConferenceModel(){ @@ -123,6 +125,10 @@ std::list> ConferenceModel::getParticipan return participantList; } +int ConferenceModel::getParticipantDeviceCount() const{ + return mConference->getParticipantDeviceList().size(); +} + void ConferenceModel::setIsReady(bool state){ if( mIsReady != state){ mIsReady = state; diff --git a/linphone-app/src/components/conference/ConferenceModel.hpp b/linphone-app/src/components/conference/ConferenceModel.hpp index 083920376..f5936b8ef 100644 --- a/linphone-app/src/components/conference/ConferenceModel.hpp +++ b/linphone-app/src/components/conference/ConferenceModel.hpp @@ -42,6 +42,7 @@ public: Q_PROPERTY(ParticipantListModel* participants READ getParticipantListModel CONSTANT) Q_PROPERTY(ParticipantModel* localParticipant READ getLocalParticipant NOTIFY localParticipantChanged) Q_PROPERTY(bool isReady MEMBER mIsReady WRITE setIsReady NOTIFY isReadyChanged) + Q_PROPERTY(int participantDeviceCount READ getParticipantDeviceCount NOTIFY participantDeviceCountChanged) static QSharedPointer create(std::shared_ptr chatRoom, QObject *parent = Q_NULLPTR); @@ -57,6 +58,7 @@ public: Q_INVOKABLE ParticipantModel* getLocalParticipant() const; ParticipantListModel* getParticipantListModel() const; std::list> getParticipantList() const; // SDK exclude me. We want to get ALL participants. + int getParticipantDeviceCount() const; void setIsReady(bool state); @@ -88,6 +90,7 @@ signals: void conferenceStateChanged(linphone::Conference::State newState); void subjectChanged(); void isReadyChanged(); + void participantDeviceCountChanged(); private: void connectTo(ConferenceListener * listener); diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp index 7244ea433..ab983d820 100644 --- a/linphone-app/src/components/other/colors/ColorListModel.hpp +++ b/linphone-app/src/components/other/colors/ColorListModel.hpp @@ -141,6 +141,12 @@ class ColorListModel : public ProxyListModel { ADD_COLOR("timeline_bg_1", "#EFF0F2", "Timeline background color 1") ADD_COLOR("timeline_bg_2", "#FFFFFF", "Timeline background color 2") + + ADD_COLOR("message_banner_bg", "#9ECD1D", "Message banner background") + ADD_COLOR("message_banner_fg", "#FFFFFF", "Message banner foreground") + ADD_COLOR("incall_message_banner_bg", "#FC4607", "Incall message banner background") + ADD_COLOR("incall_message_banner_fg", "#FFFFFF", "Incall message banner foreground") + // Keywords: 'mKeywordsMap' // s=standard, ma=main, l=list, sc=screen, me=menu diff --git a/linphone-app/src/utils/Constants.hpp b/linphone-app/src/utils/Constants.hpp index 52a083af5..a38878fb0 100644 --- a/linphone-app/src/utils/Constants.hpp +++ b/linphone-app/src/utils/Constants.hpp @@ -63,7 +63,7 @@ public: static constexpr char ContactUrl[] = "https://www.linphone.org/contact"; static constexpr char TranslationUrl[] = "https://weblate.linphone.org/projects/linphone-desktop/"; - static constexpr int MaxMosaicParticipants = 9;// From 10, the mosaic quality will be limited to avoid useless computations + static constexpr int MaxMosaicParticipants = 6;// From 7, the mosaic quality will be limited to avoid useless computations static constexpr char LinphoneBZip2_exe[] = "https://www.linphone.org/releases/windows/tools/bzip2/bzip2.exe"; static constexpr char LinphoneBZip2_dll[] = "https://www.linphone.org/releases/windows/tools/bzip2/bzip2.dll"; diff --git a/linphone-app/ui/modules/Common/Misc/MessageBanner.qml b/linphone-app/ui/modules/Common/Misc/MessageBanner.qml index 58fc4b1c0..1336afd32 100644 --- a/linphone-app/ui/modules/Common/Misc/MessageBanner.qml +++ b/linphone-app/ui/modules/Common/Misc/MessageBanner.qml @@ -10,7 +10,11 @@ Rectangle{ property int fitHeight: visible && opacity > 0 ? 32 : 0 property string noticeBannerText - property int iconMode : 1 // 0=noIcons, 1=copy + property bool showIcon: true + property alias pointSize: textItem.font.pointSize + property alias textColor: textItem.color + property alias icon: iconItem.icon + property alias iconColor: iconItem.overwriteColor // = textColor by default onNoticeBannerTextChanged: if(noticeBannerText!='') mainItem.state = "showed" @@ -27,12 +31,14 @@ Rectangle{ anchors.centerIn: parent spacing: 5 Icon{ - icon: if(iconMode == 1) MessageBannerStyle.copyTextIcon - overwriteColor: MessageBannerStyle.textColor + id: iconItem + icon: mainItem.showIcon ? MessageBannerStyle.copyTextIcon : '' + overwriteColor: textItem.color iconSize: 20 - visible: iconMode != 0 + visible: mainItem.showIcon } Text{ + id: textItem Layout.fillHeight: true Layout.fillWidth: true text: mainItem.noticeBannerText diff --git a/linphone-app/ui/modules/Common/Styles/Misc/MessageBannerStyle.qml b/linphone-app/ui/modules/Common/Styles/Misc/MessageBannerStyle.qml index 5f22c52fd..c161a0136 100644 --- a/linphone-app/ui/modules/Common/Styles/Misc/MessageBannerStyle.qml +++ b/linphone-app/ui/modules/Common/Styles/Misc/MessageBannerStyle.qml @@ -9,7 +9,7 @@ QtObject { property string sectionName: 'MessageBanner' property string copyTextIcon : 'menu_copy_text_custom' - property color color: ColorsList.add(sectionName+'_message_banner', '', 'Background of message banner', '#9ecd1d').color - property color textColor: ColorsList.add(sectionName+'_message_banner_text', 'q', 'Text of message banner').color + property color color: ColorsList.add(sectionName+'_message_banner', 'message_banner_bg', 'Background of message banner').color + property color textColor: ColorsList.add(sectionName+'_message_banner_text', 'message_banner_fg', 'Text of message banner').color property int pointSize: Units.dp * 9 } diff --git a/linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml b/linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml index 232572d19..9f13c7bd4 100644 --- a/linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml +++ b/linphone-app/ui/modules/Linphone/Calls/IncallAvatar.qml @@ -43,7 +43,7 @@ Avatar { return null; } - username: (mainItem.isPaused || !_username) ? '' : _username + username: _username ? _username : '' Text { anchors.fill: parent color: CallStyle.container.pause.text.color diff --git a/linphone-app/ui/modules/Linphone/Sticker/DecorationSticker.qml b/linphone-app/ui/modules/Linphone/Sticker/DecorationSticker.qml index 1737229b4..a01f93504 100644 --- a/linphone-app/ui/modules/Linphone/Sticker/DecorationSticker.qml +++ b/linphone-app/ui/modules/Linphone/Sticker/DecorationSticker.qml @@ -19,7 +19,7 @@ Item{ id: mainItem default property alias _content: content.data property alias speakingOverlayDisplayed: effect.visible - property alias username: username.text + property string username: mainItem._currentDevice ? mainItem._currentDevice.displayName : '' property bool showUsername: true property ParticipantDeviceModel _currentDevice @@ -78,7 +78,7 @@ Item{ } } Text{ - id: username + id: usernameItem visible: mainItem.showUsername && mainItem._currentDevice anchors.right: parent.right anchors.left: parent.left @@ -86,19 +86,20 @@ Item{ anchors.margins: 10 elide: Text.ElideRight maximumLineCount: 1 - text: mainItem._currentDevice && mainItem._currentDevice.displayName + (mainItem._isPaused ? ' (en pause)' : '') + //: 'paused' : Pause state on sticker, next to username. + text: mainItem.username + (mainItem._isPaused ? ' ('+qsTr('paused')+')' : '') font.pointSize: DecorationStickerStyle.contactDescription.pointSize font.weight: DecorationStickerStyle.contactDescription.weight color: DecorationStickerStyle.contactDescription.color } Glow { - anchors.fill: username - visible: username.visible + anchors.fill: usernameItem + visible: usernameItem.visible //spread: 1 radius: 12 samples: 25 color: "#80000000" - source: username + source: usernameItem } ActionButton{ visible: mainItem._showCloseButton && mainItem._isPreview && mainItem._callModel && mainItem._callModel.videoEnabled diff --git a/linphone-app/ui/views/App/Calls/Incall.qml b/linphone-app/ui/views/App/Calls/Incall.qml index 6f959ffcc..2dd710562 100644 --- a/linphone-app/ui/views/App/Calls/Incall.qml +++ b/linphone-app/ui/views/App/Calls/Incall.qml @@ -20,20 +20,38 @@ import 'qrc:/ui/scripts/Utils/utils.js' as Utils // ============================================================================= Rectangle { - id: conference + id: mainItem property CallModel callModel property ConferenceModel conferenceModel: callModel && callModel.conferenceModel property bool cameraIsReady : false property bool previewIsReady : false property bool isFullScreen: false // Use this variable to test if we are in fullscreen. Do not test _fullscreen : we need to clean memory before having the window (see .js file) - property bool isAudioOnly: callModel && callModel.isConference && conferenceLayout.sourceComponent == gridComponent && !callModel.videoEnabled + property var _fullscreen: null on_FullscreenChanged: if( !_fullscreen) isFullScreen = false property bool listCallsOpened: true signal openListCallsRequest() + + property int participantCount: mainItem.conferenceModel + ? mainItem.conferenceModel.participantDeviceCount + : conferenceLayout.item ? conferenceLayout.item.participantCount : 0 + +// States + property bool isAudioOnly: callModel && callModel.isConference && conferenceLayout.sourceComponent == gridComponent && !callModel.videoEnabled + property bool isReady : mainItem.callModel + && (!mainItem.callModel.isConference + || (mainItem.conferenceModel && mainItem.conferenceModel.isReady) + ) + && conferenceLayout.item && conferenceLayout.status == Loader.Ready + function updateMessageBanner(){ + //: ''You are alone in this conference' : Text in message banner when the user is the only participant. + if( isReady && participantCount <= 1) messageBanner.noticeBannerText = qsTr('aloneInConference') + } + onParticipantCountChanged: updateMessageBanner() + onIsReadyChanged: updateMessageBanner() // --------------------------------------------------------------------------- color: IncallStyle.backgroundColor @@ -42,10 +60,9 @@ Rectangle { target: callModel onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height) - onStatusChanged: Logic.handleStatusChanged (status, conference._fullscreen) + onStatusChanged: Logic.handleStatusChanged (status, mainItem._fullscreen) onVideoRequested: Logic.handleVideoRequested(callModel) } - // --------------------------------------------------------------------------- Rectangle{ MouseArea{ @@ -119,6 +136,7 @@ Rectangle { isCustom: true backgroundRadius: width/2 colorSet: IncallStyle.buttons.dialpad + visible: mainItem.isReady toggled: telKeypad.visible onClicked: telKeypad.visible = !telKeypad.visible } @@ -129,6 +147,7 @@ Rectangle { backgroundRadius: width/2 colorSet: IncallStyle.buttons.callQuality icon: IncallStyle.buttons.callQuality.icon_0 + visible: mainItem.isReady toggled: callStatistics.isOpen onClicked: callStatistics.isOpen ? callStatistics.close() : callStatistics.open() @@ -155,43 +174,56 @@ Rectangle { } // Title - ColumnLayout{ + Item{ Layout.fillWidth: true - Text{ - id: title - Timer{ - id: elapsedTimeRefresher - running: true - interval: 1000 - repeat: true - onTriggered: if(conferenceModel) parent.elaspedTime = Utils.formatElapsedTime(conferenceModel.getElapsedSeconds()) - else parent.elaspedTime = Utils.formatElapsedTime(conference.callModel.duration) + Layout.fillHeight: true + ColumnLayout{ + anchors.fill: parent + Text{ + id: title + Timer{ + id: elapsedTimeRefresher + running: true + interval: 1000 + repeat: true + onTriggered: if(conferenceModel) parent.elaspedTime = Utils.formatElapsedTime(conferenceModel.getElapsedSeconds()) + else parent.elaspedTime = Utils.formatElapsedTime(mainItem.callModel.duration) + } + property string elaspedTime + horizontalAlignment: Qt.AlignHCenter + Layout.fillWidth: true + text: conferenceModel + ? conferenceModel.subject + ? conferenceModel.subject+ (elaspedTime ? ' - ' +elaspedTime : '') + : elaspedTime + : callModel + ? elaspedTime + : '' + color: IncallStyle.title.color + font.pointSize: IncallStyle.title.pointSize } - property string elaspedTime - horizontalAlignment: Qt.AlignHCenter - Layout.fillWidth: true - text: conferenceModel - ? conferenceModel.subject - ? conferenceModel.subject+ ' - ' +elaspedTime - : elaspedTime - : callModel - ? elaspedTime - : '' - color: IncallStyle.title.color - font.pointSize: IncallStyle.title.pointSize + Text{ + id: address + Layout.fillWidth: true + horizontalAlignment: Qt.AlignHCenter + visible: !conferenceModel && callModel && !callModel.isConference + text: !conferenceModel && callModel + ? callModel.peerAddress + : '' + color: IncallStyle.title.color + font.pointSize: IncallStyle.title.addressPointSize + } + } - Text{ - id: address - Layout.fillWidth: true - horizontalAlignment: Qt.AlignHCenter - visible: !conferenceModel && callModel && !callModel.isConference - text: !conferenceModel && callModel - ? callModel.peerAddress - : '' - color: IncallStyle.title.color - font.pointSize: IncallStyle.title.addressPointSize + MessageBanner{ + id: messageBanner + + anchors.fill: parent + textColor: IncallStyle.header.messageBanner.textColor + color: IncallStyle.header.messageBanner.color + showIcon: false + pointSize: IncallStyle.header.messageBanner.pointSize } - } // Mode buttons ActionButton{ @@ -205,9 +237,9 @@ Rectangle { isCustom: true backgroundRadius: width/2 colorSet: IncallStyle.buttons.record - property CallModel callModel: conference.callModel + property CallModel callModel: mainItem.callModel onCallModelChanged: if(!callModel) callModel.stopRecording() - visible: SettingsModel.callRecorderEnabled && callModel + visible: SettingsModel.callRecorderEnabled && callModel && (callModel.recording || mainItem.isReady) toggled: callModel.recording onClicked: { @@ -224,8 +256,8 @@ Rectangle { isCustom: true backgroundRadius: width/2 colorSet: IncallStyle.buttons.screenshot - visible: conference.callModel.snapshotEnabled - onClicked: conference.callModel.takeSnapshot() + visible: mainItem.callModel.snapshotEnabled && mainItem.isReady + onClicked: mainItem.callModel.takeSnapshot() //: 'Take Snapshot' : Tooltip for takking snapshot. tooltipText: qsTr('incallSnapshotTooltip') } @@ -233,7 +265,7 @@ Rectangle { isCustom: true backgroundRadius: width/2 colorSet: IncallStyle.buttons.fullscreen - visible: conference.callModel.videoEnabled + visible: mainItem.callModel.videoEnabled onClicked: Logic.showFullscreen(window, conference, 'IncallFullscreen.qml', title.mapToGlobal(0,0)) } @@ -259,18 +291,18 @@ Rectangle { id: grid Layout.leftMargin: 70 Layout.rightMargin: rightMenu.visible ? 15 : 70 - callModel: conference.callModel - cameraEnabled: !conference.isFullScreen + callModel: mainItem.callModel + cameraEnabled: !mainItem.isFullScreen } } Component{ id: activeSpeakerComponent IncallActiveSpeaker{ id: activeSpeaker - callModel: conference.callModel + callModel: mainItem.callModel isRightReducedLayout: rightMenu.visible - isLeftReducedLayout: conference.listCallsOpened - cameraEnabled: !conference.isFullScreen + isLeftReducedLayout: mainItem.listCallsOpened + cameraEnabled: !mainItem.isFullScreen onCameraEnabledChanged: console.log(cameraEnabled) } } @@ -282,23 +314,18 @@ Rectangle { Loader{ id: conferenceLayout anchors.fill: parent - sourceComponent: conference.conferenceModel - ? conference.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid || !conference.callModel.videoEnabled + sourceComponent: mainItem.conferenceModel + ? mainItem.callModel.conferenceVideoLayout == LinphoneEnums.ConferenceLayoutGrid || !mainItem.callModel.videoEnabled ? gridComponent : activeSpeakerComponent : activeSpeakerComponent - onSourceComponentChanged: console.log("conferenceLayout: "+conference.callModel.conferenceVideoLayout) - active: conference.callModel + onSourceComponentChanged: console.log("conferenceLayout: "+mainItem.callModel.conferenceVideoLayout) + active: mainItem.callModel } Rectangle{ anchors.fill: parent - color: conference.color - visible: !conference.callModel || (conference.callModel.isConference - && (!conference.conferenceModel - || (conference.conferenceModel && !conference.conferenceModel.isReady)) - ) - || !conferenceLayout.item - || (conferenceLayout.sourceComponent == gridComponent && !conference.callModel.videoEnabled && conferenceLayout.item.participantCount <= 1) + color: mainItem.color + visible: !mainItem.isReady ColumnLayout { anchors.fill: parent BusyIndicator{ @@ -311,7 +338,7 @@ Rectangle { Text{ Layout.alignment: Qt.AlignCenter - text: conferenceLayout.sourceComponent == gridComponent && !conference.callModel.videoEnabled + text: false //mainItem.needMoreParticipants //: 'Waiting for another participant...' : Waiting message for more participant. ? qsTr('incallWaitParticipantMessage') //: 'Video conference is not ready. Please Wait...' : Waiting message for starting conference. @@ -326,8 +353,8 @@ Rectangle { Layout.fillHeight: true Layout.preferredWidth: 400 Layout.rightMargin: 30 - callModel: conference.callModel - conferenceModel: conference.conferenceModel + callModel: mainItem.callModel + conferenceModel: mainItem.conferenceModel visible: false onClose: rightMenu.visible = !rightMenu.visible onLayoutChanging: conferenceLayout.item.clearAll(layoutMode) @@ -404,6 +431,7 @@ Rectangle { z: 2 RowLayout{ spacing: 10 + visible: mainItem.isReady Row { spacing: 2 visible: SettingsModel.muteMicrophoneEnabled @@ -453,7 +481,7 @@ Rectangle { backgroundRadius: 90 colorSet: callModel && callModel.cameraEnabled ? IncallStyle.buttons.cameraOn : IncallStyle.buttons.cameraOff updating: callModel.videoEnabled && callModel.updating - enabled: !conference.isAudioOnly + enabled: !mainItem.isAudioOnly onClicked: if(callModel){ if( callModel.isConference){// Only deactivate camera in conference. callModel.cameraEnabled = !callModel.cameraEnabled @@ -469,7 +497,7 @@ Rectangle { ActionButton{ isCustom: true backgroundRadius: width/2 - visible: SettingsModel.callPauseEnabled + visible: SettingsModel.callPauseEnabled && mainItem.isReady updating: callModel.updating colorSet: callModel.pausedByUser ? IncallStyle.buttons.play : IncallStyle.buttons.pause onClicked: callModel.pausedByUser = !callModel.pausedByUser @@ -534,9 +562,9 @@ Rectangle { CallStatistics { id: callStatistics - call: conference.callModel - width: conference.width - height: conference.height + call: mainItem.callModel + width: mainItem.width + height: mainItem.height } TelKeypad { id: telKeypad diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index 708b2ad4a..0a7265a8c 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -26,7 +26,7 @@ Item { property bool isLeftReducedLayout: false property bool cameraEnabled: true property bool showMe : !(callModel && callModel.pausedByUser) && (callModel.isConference || callModel.localVideoEnabled) - property int participantCount: callModel.isConference ? allDevices.count : 2 + property int participantCount: callModel.isConference ? allDevices.count + 1 : 2 // +me onParticipantCountChanged: {console.log("Conf count: " +participantCount);allDevices.updateCurrentDevice()} diff --git a/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml b/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml index 9b39a1616..a78f20262 100644 --- a/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml @@ -135,6 +135,12 @@ QtObject { property QtObject stats: QtObject { property int relativeY: 90 } + + property QtObject messageBanner: QtObject{ + property color color: ColorsList.add(sectionName+'_message_bg', 'incall_message_banner_bg').color + property color textColor: ColorsList.add(sectionName+'_message_fg', 'incall_message_banner_fg').color + property int pointSize: Units.dp * 10 + } } property QtObject zrtpArea: QtObject {