From 5a070557082802cc291d17f8fbae57e6ea380e9f Mon Sep 17 00:00:00 2001 From: ababi <albert.babi@savoirfairelinux.com> Date: Thu, 8 Oct 2020 18:16:33 +0200 Subject: [PATCH] callview: fullscreen to compact view revision - add "close" icon for fullscreen exit insead of "back arrow" - fullscreen exit does not switch to welcome view - "toggle fullscreen" centralized in CallStackView - avoid using white svg images - spelling revision Gitlab: #135 Change-Id: I871b75aac22d23b33be8e177102fe68bb8bd5e86 --- .../components/AccountComboBoxPopup.qml | 2 +- src/mainview/components/AudioCallPage.qml | 2 +- src/mainview/components/CallOverlay.qml | 15 ++++-- src/mainview/components/CallStackView.qml | 47 +++++++++++-------- .../components/CallViewContextMenu.qml | 12 ++--- src/mainview/components/UserInfoCallPage.qml | 4 +- src/mainview/components/VideoCallPage.qml | 12 +++-- .../AdvancedSIPSecuritySettings.qml | 8 ++-- 8 files changed, 62 insertions(+), 40 deletions(-) diff --git a/src/mainview/components/AccountComboBoxPopup.qml b/src/mainview/components/AccountComboBoxPopup.qml index 877eceb6a..8b616b1a6 100644 --- a/src/mainview/components/AccountComboBoxPopup.qml +++ b/src/mainview/components/AccountComboBoxPopup.qml @@ -28,7 +28,7 @@ import "../../commoncomponents" Popup { id: root - property bool toogleUpdatePopupHeight: false + property bool toggleUpdatePopupHeight: false y: accountComboBox.height - 1 implicitWidth: accountComboBox.width - 1 diff --git a/src/mainview/components/AudioCallPage.qml b/src/mainview/components/AudioCallPage.qml index b944ddb36..22955e4c2 100644 --- a/src/mainview/components/AudioCallPage.qml +++ b/src/mainview/components/AudioCallPage.qml @@ -97,7 +97,7 @@ Rectangle { acceptedButtons: Qt.LeftButton - onDoubleClicked: showFullScreenReqested() + onDoubleClicked: callStackView.toggleFullScreen() CallOverlay { id: audioCallOverlay diff --git a/src/mainview/components/CallOverlay.qml b/src/mainview/components/CallOverlay.qml index 98bcf6088..1ebd4bbd4 100644 --- a/src/mainview/components/CallOverlay.qml +++ b/src/mainview/components/CallOverlay.qml @@ -171,18 +171,27 @@ Rectangle { Layout.topMargin: JamiTheme.preferredMarginSize Layout.leftMargin: JamiTheme.preferredMarginSize - source: "qrc:/images/icons/arrow_back-white-24dp.svg" + + source: callStackView.isFullscreen ? "qrc:/images/icons/round-close-24px.svg" : + "qrc:/images/icons/ic_arrow_back_24px.svg" pressedColor: JamiTheme.invertedPressedButtonColor hoveredColor: JamiTheme.invertedHoveredButtonColor normalColor: JamiTheme.invertedNormalButtonColor + imageColor: JamiTheme.whiteColor + toolTipText: qsTr("Toggle to display side panel") visible: mainViewWindow.sidePanelOnly - onClicked: mainViewWindow.showWelcomeView() - + onClicked: { + if (callStackView.isFullscreen) { + callStackView.toggleFullScreen() + } else { + mainViewWindow.showWelcomeView() + } + } } Text { diff --git a/src/mainview/components/CallStackView.qml b/src/mainview/components/CallStackView.qml index f2497bcd7..4d857097e 100644 --- a/src/mainview/components/CallStackView.qml +++ b/src/mainview/components/CallStackView.qml @@ -30,6 +30,15 @@ import "../js/callfullscreenwindowcontainercreation.js" as CallFullScreenWindowC Rectangle { id: callStackViewWindow + property bool isFullscreen: false + + enum StackNumber { + IncomingPageStack, + OutgoingPageStack, + AudioPageStack, + VideoPageStack + } + anchors.fill: parent Shortcut { @@ -69,7 +78,7 @@ Rectangle { function showAudioCallPage() { var itemToFind = callStackMainView.find(function (item) { - return item.stackNumber === 0 + return item.stackNumber === CallStackView.AudioPageStack }) if (!itemToFind) { @@ -82,7 +91,7 @@ Rectangle { function showOutgoingCallPage() { var itemToFind = callStackMainView.find(function (item) { - return item.stackNumber === 1 + return item.stackNumber === CallStackView.OutgoingPageStack }) if (!itemToFind) { @@ -94,7 +103,7 @@ Rectangle { function showIncomingCallPage(accountId, convUid) { var itemToFind = callStackMainView.find(function (item) { - return item.stackNumber === 3 + return item.stackNumber === CallStackView.IncomingPageStack }) if (!itemToFind) { @@ -109,7 +118,7 @@ Rectangle { function showVideoCallPage() { var itemToFind = callStackMainView.find(function (item) { - return item.stackNumber === 2 + return item.stackNumber === CallStackView.VideoPageStack }) if (!itemToFind) { @@ -123,18 +132,24 @@ Rectangle { videoCallPage.setDistantRendererId(callId) } - function toogleFullScreen(callPage){ - callPage.isFullscreen = !callPage.isFullscreen + function toggleFullScreen() { + isFullscreen = !isFullscreen + var callPage = callStackMainView.currentItem CallFullScreenWindowContainerCreation.createvideoCallFullScreenWindowContainerObject() if (!CallFullScreenWindowContainerCreation.checkIfVisible()) { - CallFullScreenWindowContainerCreation.setAsContainerChild( - callPage) + CallFullScreenWindowContainerCreation.setAsContainerChild(callPage) CallFullScreenWindowContainerCreation.showVideoCallFullScreenWindowContainer() } else { callPage.parent = callStackMainView CallFullScreenWindowContainerCreation.closeVideoCallFullScreenWindowContainer() } + + if (callStackMainView.find(function (item) { + return item.stackNumber === CallStackView.VideoPageStack + })) { + videoCallPage.handleParticipantsInfo(CallAdapter.getConferencesInfos()) + } } Connections { @@ -157,16 +172,13 @@ Rectangle { AudioCallPage { id: audioCallPage - property int stackNumber: 0 - property bool isFullscreen: false - - onShowFullScreenReqested: toogleFullScreen(this) + property int stackNumber: CallStackView.AudioPageStack } OutgoingCallPage { id: outgoingCallPage - property int stackNumber: 1 + property int stackNumber: CallStackView.OutgoingPageStack onCallCancelButtonIsClicked: { CallAdapter.hangUpACall(responsibleAccountId, responsibleConvUid) @@ -176,19 +188,14 @@ Rectangle { VideoCallPage { id: videoCallPage - property int stackNumber: 2 - property bool isFullscreen: false + property int stackNumber: CallStackView.VideoPageStack - onShowFullScreenReqested: { - toogleFullScreen(this) - videoCallPage.handleParticipantsInfo(CallAdapter.getConferencesInfos()) - } } IncomingCallPage { id: incomingCallPage - property int stackNumber: 3 + property int stackNumber: CallStackView.IncomingPageStack onCallAcceptButtonIsClicked: { CallAdapter.acceptACall(responsibleAccountId, responsibleConvUid) diff --git a/src/mainview/components/CallViewContextMenu.qml b/src/mainview/components/CallViewContextMenu.qml index 685df52bd..332a4dd8e 100644 --- a/src/mainview/components/CallViewContextMenu.qml +++ b/src/mainview/components/CallViewContextMenu.qml @@ -73,23 +73,23 @@ Item { }) if (isAudioOnly && !isPaused) - ContextMenuGenerator.addMenuItem(audioCallPage.isFullscreen ? JamiStrings.exitFullScreen : + ContextMenuGenerator.addMenuItem(callStackView.isFullscreen ? JamiStrings.exitFullScreen : JamiStrings.fullScreen, - audioCallPage.isFullscreen ? + callStackView.isFullscreen ? "qrc:/images/icons/close_fullscreen-24px.svg" : "qrc:/images/icons/open_in_full-24px.svg", function (){ - audioCallPage.showFullScreenReqested() + callStackView.toggleFullScreen() }) if (!isAudioOnly && !isPaused) { - ContextMenuGenerator.addMenuItem(videoCallPage.isFullscreen ? JamiStrings.exitFullScreen : + ContextMenuGenerator.addMenuItem(callStackView.isFullscreen ? JamiStrings.exitFullScreen : JamiStrings.fullScreen, - videoCallPage.isFullscreen ? + callStackView.isFullscreen ? "qrc:/images/icons/close_fullscreen-24px.svg" : "qrc:/images/icons/open_in_full-24px.svg", function (){ - videoCallPage.showFullScreenReqested() + callStackView.toggleFullScreen() }) ContextMenuGenerator.addMenuSeparator() diff --git a/src/mainview/components/UserInfoCallPage.qml b/src/mainview/components/UserInfoCallPage.qml index b6826be0b..865208eb0 100644 --- a/src/mainview/components/UserInfoCallPage.qml +++ b/src/mainview/components/UserInfoCallPage.qml @@ -58,12 +58,14 @@ Rectangle { Layout.topMargin: JamiTheme.preferredMarginSize Layout.leftMargin: JamiTheme.preferredMarginSize - source: "qrc:/images/icons/arrow_back-white-24dp.svg" + source: "qrc:/images/icons/ic_arrow_back_24px.svg" pressedColor: JamiTheme.invertedPressedButtonColor hoveredColor: JamiTheme.invertedHoveredButtonColor normalColor: JamiTheme.invertedNormalButtonColor + imageColor: JamiTheme.whiteColor + toolTipText: qsTr("Toggle to display side panel") visible: mainViewWindow.sidePanelOnly diff --git a/src/mainview/components/VideoCallPage.qml b/src/mainview/components/VideoCallPage.qml index a83e4102d..16bf1c52b 100644 --- a/src/mainview/components/VideoCallPage.qml +++ b/src/mainview/components/VideoCallPage.qml @@ -79,7 +79,8 @@ Rectangle { function handleParticipantsInfo(infos) { if (infos.length === 0) { - bestName = UtilsAdapter.getBestName(accountId, convUid) + bestName = UtilsAdapter.getBestName(AccountAdapter.currentAccountId, + UtilsAdapter.getCurrConvId()) } else { bestName = "" } @@ -139,7 +140,9 @@ Rectangle { handle: Rectangle { implicitWidth: videoCallPageRect.width implicitHeight: JamiTheme.splitViewHandlePreferredWidth - color: SplitHandle.pressed ? JamiTheme.pressColor : (SplitHandle.hovered ? JamiTheme.hoverColor : JamiTheme.tabbarBorderColor) + color: SplitHandle.pressed ? JamiTheme.pressColor : + (SplitHandle.hovered ? JamiTheme.hoverColor : + JamiTheme.tabbarBorderColor) } Rectangle { @@ -155,7 +158,7 @@ Rectangle { acceptedButtons: Qt.LeftButton - onDoubleClicked: showFullScreenReqested() + onDoubleClicked: callStackView.toggleFullScreen() CallOverlay { id: videoCallOverlay @@ -170,7 +173,8 @@ Rectangle { videoCallOverlay.setRecording(CallAdapter.isRecordingThisCall()) } - function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted, isRecording, isSIP, isConferenceCall, bestName) { + function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted, + isRecording, isSIP, isConferenceCall, bestName) { videoCallOverlay.showOnHoldImage(isPaused) videoCallOverlay.updateButtonStatus(isPaused, isAudioOnly, diff --git a/src/settingsview/components/AdvancedSIPSecuritySettings.qml b/src/settingsview/components/AdvancedSIPSecuritySettings.qml index cc612ca61..e13b687b4 100644 --- a/src/settingsview/components/AdvancedSIPSecuritySettings.qml +++ b/src/settingsview/components/AdvancedSIPSecuritySettings.qml @@ -50,8 +50,8 @@ ColumnLayout { enableSDESToggle.checked = (SettingsAdapter.getAccountConfig_SRTP_KeyExchange() === Account.KeyExchangeProtocol.SDES) fallbackRTPToggle.checked = SettingsAdapter.getAccountConfig_SRTP_RtpFallback() encryptNegotitationToggle.checked = SettingsAdapter.getAccountConfig_TLS_Enable() - verifyIncomingCertificatesServerToogle.checked = SettingsAdapter.getAccountConfig_TLS_VerifyServer() - verifyIncomingCertificatesClientToogle.checked = SettingsAdapter.getAccountConfig_TLS_VerifyClient() + verifyIncomingCertificatesServerToggle.checked = SettingsAdapter.getAccountConfig_TLS_VerifyServer() + verifyIncomingCertificatesClientToggle.checked = SettingsAdapter.getAccountConfig_TLS_VerifyClient() requireCeritificateForTLSIncomingToggle.checked = SettingsAdapter.getAccountConfig_TLS_RequireClientCertificate() var method = SettingsAdapter.getAccountConfig_TLS_Method_inInt() @@ -245,7 +245,7 @@ ColumnLayout { } ToggleSwitch { - id: verifyIncomingCertificatesServerToogle + id: verifyIncomingCertificatesServerToggle labelText: JamiStrings.verifyCertificatesServer fontPointSize: JamiTheme.settingsFontSize @@ -256,7 +256,7 @@ ColumnLayout { } ToggleSwitch { - id: verifyIncomingCertificatesClientToogle + id: verifyIncomingCertificatesClientToggle labelText: JamiStrings.verifyCertificatesClient fontPointSize: JamiTheme.settingsFontSize -- GitLab