From b3b40d6f99588311750bdae0968582980e704a00 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 6 Nov 2025 16:43:02 +0100 Subject: [PATCH] use native player to open video files #LINQT-2116 hide e2e conf creation toggle #LINQT-2112 --- Linphone/view/Control/Display/Chat/FileView.qml | 11 ----------- .../view/Control/Display/Chat/ImageFileView.qml | 5 ----- .../view/Control/Display/Chat/VideoFileView.qml | 14 +++++++++++--- .../Layout/Settings/AdvancedSettingsLayout.qml | 1 + 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Linphone/view/Control/Display/Chat/FileView.qml b/Linphone/view/Control/Display/Chat/FileView.qml index f95a9b139..62955853b 100644 --- a/Linphone/view/Control/Display/Chat/FileView.qml +++ b/Linphone/view/Control/Display/Chat/FileView.qml @@ -102,17 +102,6 @@ Item { position: 100 source: mainItem.isVideo ? "file:///" + mainItem.filePath : "" fillMode: playbackState === MediaPlayer.PlayingState ? VideoOutput.PreserveAspectFit : VideoOutput.PreserveAspectCrop - MouseArea { - propagateComposedEvents: false - enabled: videoThumbnail.visible - anchors.fill: parent - hoverEnabled: false - acceptedButtons: Qt.LeftButton - onClicked: (mouse) => { - mouse.accepted = true - videoThumbnail.playbackState === MediaPlayer.PlayingState ? videoThumbnail.pause() : videoThumbnail.play() - } - } EffectImage { anchors.centerIn: parent visible: videoThumbnail.playbackState !== MediaPlayer.PlayingState diff --git a/Linphone/view/Control/Display/Chat/ImageFileView.qml b/Linphone/view/Control/Display/Chat/ImageFileView.qml index 1de2a072e..4adc01790 100644 --- a/Linphone/view/Control/Display/Chat/ImageFileView.qml +++ b/Linphone/view/Control/Display/Chat/ImageFileView.qml @@ -26,10 +26,6 @@ Image { fillMode: Image.PreserveAspectFit source: contentGui && contentGui.core.thumbnail || "" - states: State { - name: 'hovered' - } - MouseArea { anchors.fill: parent hoverEnabled: true @@ -40,7 +36,6 @@ Image { onContainsMouseChanged: { if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor) else UtilsCpp.restoreGlobalCursor() - mainItem.state = containsMouse ? 'hovered' : '' } onPressed: (mouse) => { mouse.accepted = true diff --git a/Linphone/view/Control/Display/Chat/VideoFileView.qml b/Linphone/view/Control/Display/Chat/VideoFileView.qml index 00621baf8..e24208377 100644 --- a/Linphone/view/Control/Display/Chat/VideoFileView.qml +++ b/Linphone/view/Control/Display/Chat/VideoFileView.qml @@ -17,6 +17,7 @@ Rectangle { property var fillMode: playbackState === MediaPlayer.PlayingState ? VideoOutput.PreserveAspectFit : VideoOutput.PreserveAspectCrop property alias videoOutput: output property string source: mediaPlayer.source + MediaPlayer { id: mediaPlayer source: UtilsCpp.isVideo(mainItem.filePath) ? "file:///" + mainItem.filePath : "" @@ -54,11 +55,18 @@ Rectangle { propagateComposedEvents: false enabled: mainItem.visible anchors.fill: parent - hoverEnabled: false + hoverEnabled: true acceptedButtons: Qt.LeftButton - onClicked: (mouse) => { + cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor + // Changing cursor in MouseArea seems not to work with the Loader + // Use override cursor for this case + onContainsMouseChanged: { + if (containsMouse) UtilsCpp.setGlobalCursor(Qt.PointingHandCursor) + else UtilsCpp.restoreGlobalCursor() + } + onPressed: (mouse) => { mouse.accepted = true - mediaPlayer.playbackState === MediaPlayer.PlayingState ? mediaPlayer.pause() : mediaPlayer.play() + mainItem.contentGui.core.lOpenFile() } } EffectImage { diff --git a/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml index e61474910..c48a06830 100644 --- a/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml @@ -137,6 +137,7 @@ AbstractSettingsLayout { propertyOwner: SettingsCpp } SwitchSetting { + visible: false Layout.fillWidth: true //: Create end to end encrypted meetings and group calls titleText: qsTr("settings_advanced_create_endtoend_encrypted_meetings_title")