mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
use native player to open video files #LINQT-2116
hide e2e conf creation toggle #LINQT-2112
This commit is contained in:
parent
d957fae94e
commit
b3b40d6f99
4 changed files with 12 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue