Fix anchors in layout error and eventId is not defined

This commit is contained in:
Carl Schwan
2020-11-08 12:08:18 +01:00
parent 041d97a233
commit bf8c54c987
3 changed files with 67 additions and 57 deletions

View File

@@ -184,16 +184,14 @@ Kirigami.ScrollablePage {
roleValue: "message"
delegate: TimelineContainer {
width: messageListView.width
MouseArea {
acceptedButtons: Qt.RightButton
anchors.fill: parent
onClicked: openMessageContext(author, display, eventId, toolTip);
}
innerObject: MessageDelegate {
Layout.fillWidth: true
Layout.maximumWidth: messageListView.width
mouseArea: MouseArea {
acceptedButtons: Qt.RightButton
anchors.fill: parent
onClicked: openMessageContext(author, display, eventId, toolTip);
}
innerObject: TextDelegate {
Layout.fillWidth: true
}
@@ -304,7 +302,8 @@ Kirigami.ScrollablePage {
function openMessageContext(author, message, eventId, toolTip, model) {
const contextMenu = messageDelegateContextMenu.createObject(root, {
'author': author,
'message': message
'message': message,
'eventId': eventId,
});
contextMenu.viewSource.connect(function() {
messageSourceDialog.createObject(root, {