From 46680c66e6c50846ffc99a2e5f644d7afe66b538 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 26 Sep 2022 16:58:15 +0200 Subject: [PATCH] Fix preview on grids/active speaker. Change colors of preview. --- linphone-app/src/components/other/colors/ColorListModel.hpp | 1 + linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml | 5 +++-- linphone-app/ui/views/App/Calls/IncallGrid.qml | 4 +--- linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp index 92e764ac5..7eb3e250b 100644 --- a/linphone-app/src/components/other/colors/ColorListModel.hpp +++ b/linphone-app/src/components/other/colors/ColorListModel.hpp @@ -123,6 +123,7 @@ class ColorListModel : public ProxyListModel { ADD_COLOR("conference_bg", "#798791", "Conferences: Background") ADD_COLOR("conference_avatar_sticker_bg", "#A1A1A1", "Conferences : Background for sticker avatar") + ADD_COLOR("conference_avatar_preview_sticker_bg", "#475663", "Conferences : Background for sticker avatar of preview") ADD_COLOR("conference_avatar_initials_bg", "#798791", "Conferences : Background for avatar initials") ADD_COLOR("fullscreen_conference_bg", "black", "Conferences: Fullscreen background") diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index e8a009b5c..f635457ed 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -85,7 +85,8 @@ Item { anchors.fill: parent anchors.margins: 3 - deactivateCamera: !mainItem.callModel || !mainItem.showMe || !mainItem.callModel.localVideoEnabled + deactivateCamera: !mainItem.callModel || !mainItem.showMe || !mainItem.callModel.cameraEnabled + //onDeactivateCameraChanged: console.log(deactivateCamera + " = " +mainItem.callModel +" / " +mainItem.showMe +" / " +mainItem.callModel.localVideoEnabled) currentDevice: allDevices.me isPreview: true callModel: mainItem.callModel @@ -93,7 +94,7 @@ Item { showCloseButton: false showCustomButton: false showAvatarBorder: true - avatarStickerBackgroundColor: IncallStyle.container.avatar.stickerBackgroundColor + avatarStickerBackgroundColor: IncallStyle.container.avatar.stickerPreviewBackgroundColor avatarBackgroundColor: IncallStyle.container.avatar.backgroundColor } } diff --git a/linphone-app/ui/views/App/Calls/IncallGrid.qml b/linphone-app/ui/views/App/Calls/IncallGrid.qml index 97b777f5a..10d2f20a9 100644 --- a/linphone-app/ui/views/App/Calls/IncallGrid.qml +++ b/linphone-app/ui/views/App/Calls/IncallGrid.qml @@ -37,8 +37,6 @@ Mosaic { id: gridModel property ParticipantDeviceProxyModel participantDevices : ParticipantDeviceProxyModel { id: participantDevices - property bool cameraEnabled: callModel && callModel.cameraEnabled - onCameraEnabledChanged: showMe = cameraEnabled // Do it on changed to ignore hard bindings (that can be override) showMe: true } model: participantDevices @@ -64,7 +62,7 @@ Mosaic { isPaused: avatarCell.currentDevice && avatarCell.currentDevice.isPaused showCloseButton: false showCustomButton: false - avatarStickerBackgroundColor: IncallStyle.container.avatar.stickerBackgroundColor + avatarStickerBackgroundColor: isPreview? IncallStyle.container.avatar.stickerPreviewBackgroundColor : IncallStyle.container.avatar.stickerBackgroundColor avatarBackgroundColor: IncallStyle.container.avatar.backgroundColor //onCloseRequested: participantDevices.showMe = false diff --git a/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml b/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml index a78f20262..6d0ec6d7c 100644 --- a/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/IncallStyle.qml @@ -95,6 +95,7 @@ QtObject { property QtObject avatar: QtObject { property color stickerBackgroundColor: ColorsList.add(sectionName+'_container_avatar_sticker_bg', 'conference_avatar_sticker_bg').color + property color stickerPreviewBackgroundColor: ColorsList.add(sectionName+'_container_avatar_preview_sticker_bg', 'conference_avatar_preview_sticker_bg').color property color backgroundColor: ColorsList.add(sectionName+'_container_avatar_initials_bg', 'conference_avatar_initials_bg').color property int maxSize: 300