mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-18 11:58:11 +00:00
call bad signal icon color Re-send option in message menu if not delivered Do not show error message creating chatroom if in call as it is not being created by user #LINQT-2287 and do not try to create one if chat is not enabled in conference
55 lines
No EOL
1.9 KiB
QML
55 lines
No EOL
1.9 KiB
QML
import QtQuick
|
|
import QtQuick.Controls as Control
|
|
import QtQuick.Layouts
|
|
|
|
import Linphone
|
|
import UtilsCpp
|
|
import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils
|
|
|
|
// =============================================================================
|
|
|
|
|
|
// ---------------------------------------------------------------------
|
|
// Separated file to show a single image bigger in chat message
|
|
// The FileView file does not allow that as it is a Loader and the image
|
|
// is reloaded everytime the message becomes visible again. It causes the
|
|
// chat message not to be able to adapt its size according to the painted
|
|
// size of the image
|
|
// ---------------------------------------------------------------------
|
|
AnimatedImage {
|
|
id: mainItem
|
|
property ChatMessageContentGui contentGui
|
|
|
|
mipmap: false//SettingsModel.mipmapEnabled
|
|
autoTransform: true
|
|
fillMode: Image.PreserveAspectFit
|
|
source: contentGui && UtilsCpp.isAnimatedImage(contentGui.core.filePath) ? ('file:/'+ contentGui.core.filePath) : ""
|
|
|
|
states: State {
|
|
name: 'hovered'
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
propagateComposedEvents: true
|
|
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()
|
|
mainItem.state = containsMouse ? 'hovered' : ''
|
|
}
|
|
onPressed: (mouse) => {
|
|
mouse.accepted = true
|
|
// if(SettingsModel.isVfsEncrypted){
|
|
// window.attachVirtualWindow(Utils.buildCommonDialogUri('FileViewDialog'), {
|
|
// contentGui: mainItem.contentGui,
|
|
// }, function (status) {
|
|
// })
|
|
// }else
|
|
mainItem.contentGui.core.lOpenFile()
|
|
}
|
|
}
|
|
} |