Remove double padding on redactions
This commit is contained in:
parent
a5bfc833e4
commit
a703e6f041
@ -10,7 +10,7 @@ import im.nheko 1.0
|
|||||||
Rectangle{
|
Rectangle{
|
||||||
|
|
||||||
required property real delegateWidth
|
required property real delegateWidth
|
||||||
height: redactedLayout.implicitHeight + 2 * Nheko.paddingSmall
|
height: redactedLayout.implicitHeight + Nheko.paddingSmall
|
||||||
width: redactedLayout.implicitWidth + 2 * Nheko.paddingMedium
|
width: redactedLayout.implicitWidth + 2 * Nheko.paddingMedium
|
||||||
radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall
|
radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall
|
||||||
color: Nheko.colors.alternateBase
|
color: Nheko.colors.alternateBase
|
||||||
@ -18,6 +18,8 @@ Rectangle{
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
id: redactedLayout
|
id: redactedLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
spacing: Nheko.paddingSmall
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: trashImg
|
id: trashImg
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
@ -27,13 +29,14 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
id: redactedLabel
|
id: redactedLabel
|
||||||
Layout.margins: Nheko.paddingSmall
|
Layout.margins: 0
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: delegateWidth - 4 * Nheko.paddingSmall - trashImg.width - 2 * Nheko.paddingMedium
|
Layout.maximumWidth: delegateWidth - 4 * Nheko.paddingSmall - trashImg.width - 2 * Nheko.paddingMedium
|
||||||
property var redactedPair: room.formatRedactedEvent(eventId)
|
property var redactedPair: room.formatRedactedEvent(eventId)
|
||||||
text: redactedPair["first"]
|
text: redactedPair["first"]
|
||||||
wrapMode: Label.WordWrap
|
wrapMode: Label.WordWrap
|
||||||
|
color: Nheko.colors.text
|
||||||
|
|
||||||
ToolTip.text: redactedPair["second"]
|
ToolTip.text: redactedPair["second"]
|
||||||
ToolTip.visible: hh.hovered
|
ToolTip.visible: hh.hovered
|
||||||
|
Loading…
Reference in New Issue
Block a user