diff --git a/Linphone/core/call/CallCore.cpp b/Linphone/core/call/CallCore.cpp index cce85f5fa..495db902d 100644 --- a/Linphone/core/call/CallCore.cpp +++ b/Linphone/core/call/CallCore.cpp @@ -268,6 +268,7 @@ void CallCore::setSelf(QSharedPointer me) { setSpeakerVolumeGain(speakerVolume); setMicrophoneVolumeGain(micVolume); setRecordable(state == linphone::Call::State::StreamsRunning); + setPaused(state == linphone::Call::State::Paused || state == linphone::Call::State::PausedByRemote); }); }); mCallModelConnection->makeConnectToModel(&CallModel::statusChanged, [this](linphone::Call::Status status) { @@ -276,9 +277,6 @@ void CallCore::setSelf(QSharedPointer me) { mCallModelConnection->makeConnectToCore(&CallCore::lSetPaused, [this](bool paused) { mCallModelConnection->invokeToModel([this, paused]() { mCallModel->setPaused(paused); }); }); - mCallModelConnection->makeConnectToModel(&CallModel::pausedChanged, [this](bool paused) { - mCallModelConnection->invokeToCore([this, paused]() { setPaused(paused); }); - }); mCallModelConnection->makeConnectToCore(&CallCore::lTransferCall, [this](QString address) { mCallModelConnection->invokeToModel([this, address]() { diff --git a/Linphone/model/call/CallModel.cpp b/Linphone/model/call/CallModel.cpp index 8a9757755..1ad568318 100644 --- a/Linphone/model/call/CallModel.cpp +++ b/Linphone/model/call/CallModel.cpp @@ -90,15 +90,12 @@ void CallModel::terminate() { void CallModel::setPaused(bool paused) { mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); - linphone::Status status = -1; if (paused) { - if (mMonitor->getConference()) status = mMonitor->getConference()->leave(); - else status = mMonitor->pause(); - if (status == 0) emit pausedChanged(paused); + if (mMonitor->getConference()) mMonitor->getConference()->leave(); + mMonitor->pause(); } else { - if (mMonitor->getConference()) status = mMonitor->getConference()->enter(); - else status = mMonitor->resume(); - if (status == 0) emit pausedChanged(paused); + if (mMonitor->getConference()) mMonitor->getConference()->enter(); + mMonitor->resume(); } } diff --git a/Linphone/view/App/CallsWindow.qml b/Linphone/view/App/CallsWindow.qml index dc8b417be..33016c7c3 100644 --- a/Linphone/view/App/CallsWindow.qml +++ b/Linphone/view/App/CallsWindow.qml @@ -421,31 +421,35 @@ AppWindow { Control.Control { visible: mainWindow.call && (mainWindow.call.core.recording || mainWindow.call.core.remoteRecording) - width: 563 * DefaultStyle.dp - height: 45 * DefaultStyle.dp anchors.centerIn: parent - leftPadding: 15 * DefaultStyle.dp + leftPadding: 14 * DefaultStyle.dp rightPadding: 14 * DefaultStyle.dp + topPadding: 6 * DefaultStyle.dp + bottomPadding: 6 * DefaultStyle.dp background: Rectangle { anchors.fill: parent color: DefaultStyle.grey_500 radius: 10 * DefaultStyle.dp } contentItem: RowLayout { - EffectImage { - imageSource: AppIcons.recordFill - colorizationColor: DefaultStyle.danger_500main - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp - } - Text { - color: DefaultStyle.danger_500main - font.pixelSize: 14 * DefaultStyle.dp - text: mainWindow.call - ? mainWindow.call.core.recording - ? mainWindow.conference ? qsTr("Vous enregistrez la réunion") : qsTr("Vous enregistrez l'appel") - : mainWindow.conference ? qsTr("Un participant enregistre la réunion") : qsTr("Votre correspondant enregistre l'appel") - : "" + spacing: 85 * DefaultStyle.dp + RowLayout { + spacing: 15 * DefaultStyle.dp + EffectImage { + imageSource: AppIcons.recordFill + colorizationColor: DefaultStyle.danger_500main + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + } + Text { + color: DefaultStyle.danger_500main + font.pixelSize: 14 * DefaultStyle.dp + text: mainWindow.call + ? mainWindow.call.core.recording + ? mainWindow.conference ? qsTr("Vous enregistrez la réunion") : qsTr("Vous enregistrez l'appel") + : mainWindow.conference ? qsTr("Un participant enregistre la réunion") : qsTr("Votre correspondant enregistre l'appel") + : "" + } } Button { visible: mainWindow.call && mainWindow.call.core.recording @@ -738,6 +742,7 @@ AppWindow { } } onClicked: { + console.log("call is paused", modelData.core.paused) modelData.core.lSetPaused(!modelData.core.paused) } } diff --git a/Linphone/view/Item/Contact/Sticker.qml b/Linphone/view/Item/Contact/Sticker.qml index 6f26cb813..813558c62 100644 --- a/Linphone/view/Item/Contact/Sticker.qml +++ b/Linphone/view/Item/Contact/Sticker.qml @@ -280,11 +280,11 @@ Item { CheckableButton { id: muteIcon icon.source: AppIcons.microphoneSlash - Layout.preferredWidth: 18 * DefaultStyle.dp - Layout.preferredHeight: 18 * DefaultStyle.dp + Layout.preferredWidth: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp) + Layout.preferredHeight: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp) visible: mainItem.mutedStatus - icon.width: 19 * DefaultStyle.dp - icon.height: 19 * DefaultStyle.dp + icon.width: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp) + icon.height: Math.min(mainItem.width / 16, 20 * DefaultStyle.dp) enabled: false contentImageColor: DefaultStyle.main2_500main backgroundColor: DefaultStyle.grey_0