Add ChatBarMessageContentModel and hook up

This commit is contained in:
James Graham
2025-08-04 18:11:21 +01:00
parent 9cbe9f7280
commit c128450cf5
20 changed files with 1825 additions and 648 deletions

View File

@@ -29,6 +29,11 @@ RowLayout {
*/
required property var replyContentModel
/**
* @brief Whether the component should be editable.
*/
required property bool editable
Layout.fillWidth: true
spacing: Kirigami.Units.largeSpacing
@@ -55,6 +60,21 @@ RowLayout {
}
}
}
QQC2.Button {
id: cancelButton
anchors.top: root.top
anchors.right: root.right
visible: root.editable
display: QQC2.AbstractButton.IconOnly
text: i18nc("@action:button", "Cancel reply")
icon.name: "dialog-close"
onClicked: root.Message.room.mainCache.replyId = ""
QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
HoverHandler {
cursorShape: Qt.PointingHandCursor
}