diff --git a/ChatView/qml/ChatItem.qml b/ChatView/qml/ChatItem.qml index 9e5c7d7..271fb85 100644 --- a/ChatView/qml/ChatItem.qml +++ b/ChatView/qml/ChatItem.qml @@ -27,14 +27,18 @@ Rectangle { property alias msgModel: msgCreator.model property alias messageAttachments: attachmentsModel.model + property bool isUserMessage: false height: msgColumn.implicitHeight + 10 radius: 8 + color: isUserMessage ? palette.alternateBase + : palette.base ColumnLayout { id: msgColumn - width: parent.width + x: 5 + width: parent.width - x anchors.verticalCenter: parent.verticalCenter spacing: 5 @@ -113,6 +117,17 @@ Rectangle { } } + Rectangle { + id: userMessageMarker + + anchors.verticalCenter: parent.verticalCenter + width: 3 + height: parent.height - 8 + color: "#92BD6C" + radius: 8 + visible: root.isUserMessage + } + component TextComponent : TextBlock { required property var itemData height: implicitHeight + 10 diff --git a/ChatView/qml/RootItem.qml b/ChatView/qml/RootItem.qml index de7baa3..15f73d3 100644 --- a/ChatView/qml/RootItem.qml +++ b/ChatView/qml/RootItem.qml @@ -96,8 +96,7 @@ ChatRootView { width: ListView.view.width - scroll.width msgModel: root.chatModel.processMessageContent(model.content) messageAttachments: model.attachments - color: model.roleType === ChatModel.User ? palette.alternateBase - : palette.base + isUserMessage: model.roleType === ChatModel.User } header: Item {