mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-01 11:39:26 +00:00
- Avoid Flicking on messages. - Use a different cursor when hovering on links in chat. - Keep selection displayed on the first right click in a message.
57 lines
No EOL
1.5 KiB
QML
57 lines
No EOL
1.5 KiB
QML
import QtQuick 2.7
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import Clipboard 1.0
|
|
import Common 1.0
|
|
import Linphone 1.0
|
|
|
|
import Common.Styles 1.0
|
|
import Linphone.Styles 1.0
|
|
import TextToSpeech 1.0
|
|
import Utils 1.0
|
|
import Units 1.0
|
|
import UtilsCpp 1.0
|
|
import LinphoneEnums 1.0
|
|
|
|
import ColorsList 1.0
|
|
|
|
// =============================================================================
|
|
Column{
|
|
id: mainItem
|
|
property ContentModel contentModel
|
|
|
|
property int fitHeight: message.fitHeight + fileMessage.fitHeight + audioMessage.fitHeight
|
|
property int fitWidth: message.fitWidth + fileMessage.fitWidth + audioMessage.fitWidth
|
|
property color backgroundColor
|
|
property string lastTextSelected
|
|
property alias textColor: message.color
|
|
property alias textFont: message.font
|
|
|
|
signal rightClicked()
|
|
|
|
height: fitHeight
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
spacing: 0
|
|
|
|
property bool isOutgoing : contentModel && (contentModel.chatMessageModel.isOutgoing || contentModel.chatMessageModel.state == LinphoneEnums.ChatMessageStateIdle);
|
|
|
|
ChatAudioMessage{
|
|
id: audioMessage
|
|
contentModel: mainItem.contentModel
|
|
visible: contentModel
|
|
}
|
|
ChatFileMessage{
|
|
id: fileMessage
|
|
contentModel: mainItem.contentModel
|
|
width: parent.width
|
|
}
|
|
ChatTextMessage {
|
|
id: message
|
|
contentModel: mainItem.contentModel
|
|
onLastTextSelectedChanged: mainItem.lastTextSelected = lastTextSelected
|
|
color: isOutgoing ? ChatStyle.entry.message.outgoing.text.color : ChatStyle.entry.message.incoming.text.color
|
|
onRightClicked: mainItem.rightClicked()
|
|
}
|
|
} |