From 2c49c188e3ac58284ce9b92dc9568489d9b484e6 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Fri, 2 Apr 2021 18:29:20 -0400 Subject: [PATCH] Add delete button to popup This currently doesn't have any filtering for power levels, which needs to be fixed. --- resources/qml/MobileMessageContextPopup.qml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/resources/qml/MobileMessageContextPopup.qml b/resources/qml/MobileMessageContextPopup.qml index a213d448..3f5e92e9 100644 --- a/resources/qml/MobileMessageContextPopup.qml +++ b/resources/qml/MobileMessageContextPopup.qml @@ -178,6 +178,26 @@ Item { } } + ImageButton { + id: deleteButton + + buttonTextColor: colors.buttonText + Layout.minimumWidth: 20 + Layout.preferredWidth: 35 + Layout.minimumHeight: Layout.minimumWidth + Layout.preferredHeight: Layout.preferredWidth + height: width + Layout.alignment: Qt.AlignHCenter + hoverEnabled: true + image: ":/icons/icons/ui/delete.png" + ToolTip.visible: hovered + ToolTip.text: qsTr("Remove") + onClicked: { + TimelineManager.timeline.redactEvent(row.model.id) + popupRoot.hide() + } + } + EmojiButton { id: reactButton