diff --git a/linphone-app/src/components/participant/ParticipantProxyModel.cpp b/linphone-app/src/components/participant/ParticipantProxyModel.cpp index 2accba332..6abab1acd 100644 --- a/linphone-app/src/components/participant/ParticipantProxyModel.cpp +++ b/linphone-app/src/components/participant/ParticipantProxyModel.cpp @@ -39,6 +39,8 @@ ParticipantProxyModel::ParticipantProxyModel (QObject *parent) : QSortFilterProxyModel(parent) { setSourceModel(new ParticipantListModel((ConferenceModel*)nullptr, this)); + connect(this, &ParticipantProxyModel::chatRoomModelChanged, this, &ParticipantProxyModel::countChanged); + connect(this, &ParticipantProxyModel::conferenceModelChanged, this, &ParticipantProxyModel::countChanged); } // ----------------------------------------------------------------------------- diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index cda5e8bd0..e92c7e94c 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -73,6 +73,17 @@ void SettingsModel::settingsWindowClosing(void) { onSettingsTabChanged(-1); } +void SettingsModel::reloadDevices(){ + CoreManager::getInstance()->getCore()->reloadSoundDevices(); + emit captureDevicesChanged(getCaptureDevices()); + emit playbackDevicesChanged(getPlaybackDevices()); + emit playbackDeviceChanged(getPlaybackDevice()); + emit captureDeviceChanged(getCaptureDevice()); + emit ringerDeviceChanged(getRingerDevice()); + CoreManager::getInstance()->getCore()->reloadVideoDevices(); + emit videoDevicesChanged(getVideoDevices()); +} + //Provides tabbar per-tab setup/teardown mechanism for specific settings views void SettingsModel::onSettingsTabChanged(int idx) { int prevIdx = mCurrentSettingsTab; @@ -460,7 +471,7 @@ void SettingsModel::setShowAudioCodecs (bool status) { //Force a call on the 'detect' method of all video filters, updating new or removed devices void SettingsModel::accessVideoSettings() { - if(!getIsInCall())// TODO : This is a workaround to a crash when reloading video devices while in call. Spotted on Macos. + //if(!getIsInCall())// TODO : This is a workaround to a crash when reloading video devices while in call. Spotted on Macos. CoreManager::getInstance()->getCore()->reloadVideoDevices(); emit videoDevicesChanged(getVideoDevices()); } diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index eba3242f4..7f897abeb 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -238,6 +238,7 @@ public: Q_INVOKABLE void onSettingsTabChanged(int idx); Q_INVOKABLE void settingsWindowClosing(void); + Q_INVOKABLE void reloadDevices(); // Assistant. ---------------------------------------------------------------- diff --git a/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml b/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml index eb41438fd..11e1cee4f 100644 --- a/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml +++ b/linphone-app/ui/modules/Linphone/Dialog/MultimediaParametersDialog.qml @@ -33,7 +33,10 @@ DialogPlus { ] buttonsAlignment: Qt.AlignCenter + onVisibleChanged: if(visible) {SettingsModel.reloadDevices()} Component.onCompleted: { + SettingsModel.stopCaptureGraph() + SettingsModel.reloadDevices() SettingsModel.startCaptureGraph() if( fixedSize){ height = fitHeight diff --git a/linphone-app/ui/views/App/Calls/WaitingRoom.qml b/linphone-app/ui/views/App/Calls/WaitingRoom.qml index 8b3b0c58b..9ea88443c 100644 --- a/linphone-app/ui/views/App/Calls/WaitingRoom.qml +++ b/linphone-app/ui/views/App/Calls/WaitingRoom.qml @@ -77,6 +77,7 @@ Rectangle { id: loader Layout.fillWidth: true Layout.fillHeight: true + property int minSize: Math.min( loader.height, loader.width) Item{ Layout.fillHeight: true Layout.fillWidth: true @@ -84,7 +85,7 @@ Rectangle { Flipable{ id: contentsStack anchors.centerIn: parent - height: Math.min( loader.height, loader.width) + height: loader.minSize width : height property bool flipped: false @@ -110,7 +111,7 @@ Rectangle { id: previewLoader showCloseButton: false enabled: mainItem.previewLoaderEnabled - height: Math.min( loader.height, loader.width) + height: loader.minSize width : height ActionButton{ anchors.top: parent.top @@ -153,59 +154,66 @@ Rectangle { // ------------------------------------------------------------------------- // Action Buttons. // ------------------------------------------------------------------------- - RowLayout{ + Item{ Layout.fillWidth: true Layout.topMargin: 25 Layout.bottomMargin: 25 Layout.leftMargin: 25 Layout.rightMargin: 25 enabled: !mainItem.callModel - Item{ - Layout.fillWidth: true - } - // Action buttons + // Action buttons RowLayout{ - Layout.alignment: Qt.AlignCenter - spacing: 30 - RowLayout{ - spacing: 10 - ActionSwitch { - id: micro - visible: SettingsModel.muteMicrophoneEnabled - property bool microMuted: false - isCustom: true - backgroundRadius: 90 - colorSet: microMuted ? WaitingRoomStyle.buttons.microOff : WaitingRoomStyle.buttons.microOn - onClicked: microMuted = !microMuted - } - ActionSwitch { - id: speaker - property bool speakerMuted: false - isCustom: true - backgroundRadius: 90 - colorSet: speakerMuted ? WaitingRoomStyle.buttons.speakerOff : WaitingRoomStyle.buttons.speakerOn - onClicked: speakerMuted = !speakerMuted - } - ActionSwitch { - id: camera - property bool cameraEnabled: true - isCustom: true - backgroundRadius: 90 - colorSet: cameraEnabled ? WaitingRoomStyle.buttons.cameraOn : WaitingRoomStyle.buttons.cameraOff - enabled: modeChoice.selectedMode != 2 - onClicked: cameraEnabled = !cameraEnabled + anchors.centerIn: parent + spacing: 10 + ActionSwitch { + id: micro + visible: SettingsModel.muteMicrophoneEnabled + property bool microMuted: false + isCustom: true + backgroundRadius: 90 + colorSet: microMuted ? WaitingRoomStyle.buttons.microOff : WaitingRoomStyle.buttons.microOn + onClicked: microMuted = !microMuted + } + VuMeter { + enabled: !micro.microMuted + Timer { + interval: 50 + repeat: true + running: parent.enabled + + onTriggered: parent.value = SettingsModel.getMicVolume() } } - RowLayout{ - ActionButton{ - id: modeChoice - property int selectedMode: 0 - isCustom: true - backgroundRadius: width/2 - colorSet: selectedMode == 0 ? WaitingRoomStyle.buttons.gridLayout : - selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly - onClicked: selectedMode = (selectedMode + 1) % 3 - } + ActionSwitch { + id: speaker + property bool speakerMuted: false + isCustom: true + backgroundRadius: 90 + colorSet: speakerMuted ? WaitingRoomStyle.buttons.speakerOff : WaitingRoomStyle.buttons.speakerOn + onClicked: speakerMuted = !speakerMuted + } + ActionSwitch { + id: camera + property bool cameraEnabled: true + isCustom: true + backgroundRadius: 90 + colorSet: cameraEnabled ? WaitingRoomStyle.buttons.cameraOn : WaitingRoomStyle.buttons.cameraOff + enabled: modeChoice.selectedMode != 2 + onClicked: cameraEnabled = !cameraEnabled + } + } + RowLayout{ + anchors.centerIn: parent + anchors.horizontalCenterOffset: loader.minSize/2 - modeChoice.width/2 + + ActionButton{ + id: modeChoice + property int selectedMode: 0 + isCustom: true + backgroundRadius: width/2 + colorSet: selectedMode == 0 ? WaitingRoomStyle.buttons.gridLayout : + selectedMode == 1 ? WaitingRoomStyle.buttons.activeSpeakerLayout : WaitingRoomStyle.buttons.audioOnly + onClicked: selectedMode = (selectedMode + 1) % 3 } } Item{ diff --git a/linphone-app/ui/views/App/Styles/Calls/CallFullscreenStyle.qml b/linphone-app/ui/views/App/Styles/Calls/CallFullscreenStyle.qml index 34e717c46..92322859d 100644 --- a/linphone-app/ui/views/App/Styles/Calls/CallFullscreenStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/CallFullscreenStyle.qml @@ -286,7 +286,7 @@ QtObject { } property QtObject options: QtObject { property int iconSize: 40 - property string icon : 'options_custom' + property string icon : 'menu_vdots_custom' property string name : 'options' property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color diff --git a/linphone-app/ui/views/App/Styles/Calls/CallStyle.qml b/linphone-app/ui/views/App/Styles/Calls/CallStyle.qml index c76f3ec73..15f8e61a4 100644 --- a/linphone-app/ui/views/App/Styles/Calls/CallStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/CallStyle.qml @@ -288,7 +288,7 @@ QtObject { } property QtObject options: QtObject { property int iconSize: 40 - property string icon : 'options_custom' + property string icon : 'menu_vdots_custom' property string name : 'options' property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color diff --git a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml index 08cee40b0..f20545e04 100644 --- a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml @@ -408,7 +408,7 @@ QtObject { } property QtObject options: QtObject { property int iconSize: 40 - property string icon : 'options_custom' + property string icon : 'menu_vdots_custom' property string name : 'options' property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'me_n_b_inv_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'me_h_b_inv_bg').color diff --git a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml index e9a2efdea..7779451ee 100644 --- a/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/WaitingRoomStyle.qml @@ -253,7 +253,7 @@ QtObject { } property QtObject options: QtObject { property int iconSize: 40 - property string icon : 'options_custom' + property string icon : 'menu_vdots_custom' property string name : 'options' property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color