mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Start working on bubble delegate
This commit is contained in:
parent
25f19c11b1
commit
15b5712f9a
2 changed files with 13 additions and 5 deletions
|
@ -59,11 +59,17 @@ Item {
|
||||||
spacing: 2
|
spacing: 2
|
||||||
verticalLayoutDirection: ListView.BottomToTop
|
verticalLayoutDirection: ListView.BottomToTop
|
||||||
|
|
||||||
delegate: TimelineDefaultMessageStyle {
|
Component {
|
||||||
|
id: defaultMessageStyle
|
||||||
|
|
||||||
|
TimelineDefaultMessageStyle {
|
||||||
messageActions: messageActionsC
|
messageActions: messageActionsC
|
||||||
messageContextMenu: messageContextMenuC
|
messageContextMenu: messageContextMenuC
|
||||||
scrolledToThis: eventId === room.scrollTarget && (y + height > chat.y + chat.contentY && y < chat.y + chat.height + chat.contentY)
|
scrolledToThis: eventId === room.scrollTarget && (y + height > chat.y + chat.contentY && y < chat.y + chat.height + chat.contentY)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate: defaultMessageStyle
|
||||||
footer: Item {
|
footer: Item {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.margins: Nheko.paddingLarge
|
anchors.margins: Nheko.paddingLarge
|
||||||
|
|
|
@ -24,7 +24,7 @@ AbstractButton {
|
||||||
property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : ""
|
property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : ""
|
||||||
implicitHeight: replyContainer.implicitHeight
|
implicitHeight: replyContainer.implicitHeight
|
||||||
implicitWidth: replyContainer.implicitWidth
|
implicitWidth: replyContainer.implicitWidth
|
||||||
property int maxWidth
|
required property int maxWidth
|
||||||
|
|
||||||
NhekoCursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -61,11 +61,13 @@ AbstractButton {
|
||||||
id: colorline
|
id: colorline
|
||||||
|
|
||||||
width: 4
|
width: 4
|
||||||
|
height: content.height
|
||||||
|
|
||||||
color: TimelineManager.userColor(r.userId, palette.base)
|
color: TimelineManager.userColor(r.userId, palette.base)
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
id: content
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
|
|
Loading…
Reference in a new issue