Skip to content

Commit

Permalink
fix: chat message position
Browse files Browse the repository at this point in the history
  • Loading branch information
FaZeRs committed Nov 2, 2024
1 parent 55ed281 commit 8fe3b03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qml/ChatView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,13 @@ RowLayout {
clip: true
model: chat.getThread(threadList.currentIndex)
delegate: Rectangle {
x: model.isUser ? 0 : chatThread.width - width
width: Math.min(messageText.implicitWidth + 24, (chatThread.width * 0.8))
height: messageText.implicitHeight + 20
anchors {
left: model.isUser ? undefined : parent.left
right: model.isUser ? parent.right : undefined
margins: 10
}
gradient: Gradient {
orientation: Gradient.Horizontal
GradientStop {
Expand Down

0 comments on commit 8fe3b03

Please sign in to comment.