diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-09 03:49:45 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-10-09 03:49:45 +0200 |
commit | 15b5712f9a7d2f92bc3925848fedc621b6ba0471 (patch) | |
tree | 257a4be11fcd0de5c66117fee762f8e0f613df68 /resources | |
parent | Fix high CPU use caused by ItemParticle (diff) | |
download | nheko-15b5712f9a7d2f92bc3925848fedc621b6ba0471.tar.xz |
Start working on bubble delegate
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageView.qml | 14 | ||||
-rw-r--r-- | resources/qml/delegates/Reply.qml | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index 3ffe7d9a..5ea73fb5 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -59,11 +59,17 @@ Item { spacing: 2 verticalLayoutDirection: ListView.BottomToTop - delegate: TimelineDefaultMessageStyle { - messageActions: messageActionsC - messageContextMenu: messageContextMenuC - scrolledToThis: eventId === room.scrollTarget && (y + height > chat.y + chat.contentY && y < chat.y + chat.height + chat.contentY) + Component { + id: defaultMessageStyle + + TimelineDefaultMessageStyle { + messageActions: messageActionsC + messageContextMenu: messageContextMenuC + scrolledToThis: eventId === room.scrollTarget && (y + height > chat.y + chat.contentY && y < chat.y + chat.height + chat.contentY) + } } + + delegate: defaultMessageStyle footer: Item { anchors.horizontalCenter: parent.horizontalCenter anchors.margins: Nheko.paddingLarge diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml index 1598e8c0..ece838b7 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml @@ -24,7 +24,7 @@ AbstractButton { property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : "" implicitHeight: replyContainer.implicitHeight implicitWidth: replyContainer.implicitWidth - property int maxWidth + required property int maxWidth NhekoCursorShape { anchors.fill: parent @@ -61,11 +61,13 @@ AbstractButton { id: colorline width: 4 + height: content.height color: TimelineManager.userColor(r.userId, palette.base) } Column { + id: content spacing: 0 AbstractButton { |