Skip to content
Snippets Groups Projects

Change QML UI for redactions

Merged Joe Donofry requested to merge redaction_updates into master
1 unresolved thread
3 files
+ 48
37
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -170,44 +170,9 @@ Item {
DelegateChoice {
roleValue: MtxEvent.Redacted
Rectangle{
height: redactedLayout.implicitHeight + 2 * Nheko.paddingSmall
width: redactedLayout.implicitWidth + 2 * Nheko.paddingMedium
radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall
color: Nheko.colors.alternateBase
RowLayout {
id: redactedLayout
anchors.centerIn: parent
Image {
id: trashImg
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.preferredWidth: fontMetrics.font.pixelSize
Layout.preferredHeight: fontMetrics.font.pixelSize
source: "image://colorimage/:/icons/icons/ui/delete.svg?" + Nheko.colors.text
}
Label {
id: redactedLabel
Layout.margins: Nheko.paddingSmall
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
Layout.fillWidth: true
Layout.maximumWidth: d.width - 4 * Nheko.paddingSmall - trashImg.width - 2 * Nheko.paddingMedium
property var redactedPair: room.formatRedactedEvent(eventId)
text: redactedPair["first"]
wrapMode: Label.WordWrap
ToolTip.text: redactedPair["second"]
ToolTip.visible: ma.containsMouse
MouseArea {
id: ma
anchors.fill: parent
hoverEnabled: true
}
}
}
Redacted {
delegateWidth: d.width
}
}
DelegateChoice {
Loading