summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2021-11-06 20:02:03 -0400
committerGitHub <noreply@github.com>2021-11-06 20:02:03 -0400
commit66e40eed653fa336f7d57924f0b64d9f400bf763 (patch)
tree08ae35fc3b678a4eedfb7847c9d0de6fb02e488a
parentTranslated using Weblate (Estonian) (diff)
parentUse ItemDelegate for read receipts (diff)
downloadnheko-66e40eed653fa336f7d57924f0b64d9f400bf763.tar.xz
Merge pull request #790 from LorenDB/fixRRDialog
Fix clicking on read receipts for profiles
-rw-r--r--resources/qml/dialogs/ReadReceipts.qml81
1 files changed, 39 insertions, 42 deletions
diff --git a/resources/qml/dialogs/ReadReceipts.qml b/resources/qml/dialogs/ReadReceipts.qml

index e825dd81..2e2b5486 100644 --- a/resources/qml/dialogs/ReadReceipts.qml +++ b/resources/qml/dialogs/ReadReceipts.qml
@@ -58,61 +58,58 @@ ApplicationWindow { boundsBehavior: Flickable.StopAtBounds model: readReceipts - delegate: RowLayout { - spacing: Nheko.paddingMedium - - Avatar { - width: Nheko.avatarSize - height: Nheko.avatarSize - userid: model.mxid - url: model.avatarUrl.replace("mxc://", "image://MxcImage/") - displayName: model.displayName - onClicked: room.openUserProfile(model.mxid) - ToolTip.visible: avatarHover.hovered - ToolTip.text: model.mxid - - HoverHandler { - id: avatarHover - } - + delegate: ItemDelegate { + onClicked: room.openUserProfile(model.mxid) + padding: Nheko.paddingMedium + width: receiptLayout.implicitWidth + height: receiptLayout.implicitHeight + hoverEnabled: true + ToolTip.visible: hovered + ToolTip.text: model.mxid + background: Rectangle { + color: readReceiptsRoot.color } - ColumnLayout { - spacing: Nheko.paddingSmall + RowLayout { + id: receiptLayout - Label { - text: model.displayName - color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window) - font.pointSize: fontMetrics.font.pointSize - ToolTip.visible: displayNameHover.hovered - ToolTip.text: model.mxid + spacing: Nheko.paddingMedium - TapHandler { - onSingleTapped: room.openUserProfile(userId) - } + Avatar { + width: Nheko.avatarSize + height: Nheko.avatarSize + userid: model.mxid + url: model.avatarUrl.replace("mxc://", "image://MxcImage/") + displayName: model.displayName + } + + ColumnLayout { + spacing: Nheko.paddingSmall - CursorShape { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor + Label { + text: model.displayName + color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window) + font.pointSize: fontMetrics.font.pointSize } - HoverHandler { - id: displayNameHover + Label { + text: model.timestamp + color: Nheko.colors.buttonText + font.pointSize: fontMetrics.font.pointSize * 0.9 } - } + Item { + Layout.fillHeight: true + Layout.fillWidth: true + } - Label { - text: model.timestamp - color: Nheko.colors.buttonText - font.pointSize: fontMetrics.font.pointSize * 0.9 } - Item { - Layout.fillHeight: true - Layout.fillWidth: true - } + } + CursorShape { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor } }