Elide nicks and userids in read reciepts dialog

This commit is contained in:
Loren Burkholder 2023-02-25 22:25:43 -05:00
parent 0e3453660f
commit eced5c83b4

View file

@ -78,6 +78,8 @@ ApplicationWindow {
anchors.margins: Nheko.paddingSmall anchors.margins: Nheko.paddingSmall
Avatar { Avatar {
id: avatar
width: Nheko.avatarSize width: Nheko.avatarSize
height: Nheko.avatarSize height: Nheko.avatarSize
userid: model.mxid userid: model.mxid
@ -88,27 +90,28 @@ ApplicationWindow {
ColumnLayout { ColumnLayout {
spacing: Nheko.paddingSmall spacing: Nheko.paddingSmall
Layout.fillWidth: true
Label { ElidedLabel {
text: model.displayName text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window) color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: fontMetrics.font.pointSize font.pointSize: fontMetrics.font.pointSize
elideWidth: del.width - Nheko.paddingMedium - avatar.width
Layout.fillWidth: true
} }
Label { ElidedLabel {
text: model.timestamp text: model.timestamp
color: Nheko.colors.buttonText color: Nheko.colors.buttonText
font.pointSize: fontMetrics.font.pointSize * 0.9 font.pointSize: fontMetrics.font.pointSize * 0.9
} elideWidth: del.width - Nheko.paddingMedium - avatar.width
}
Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
} }
}
CursorShape { CursorShape {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor