Improve and siplify the design of state events
This commit is contained in:
@@ -19,6 +19,7 @@ RowLayout {
|
||||
Kirigami.Avatar {
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.small
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.small
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
name: author.name
|
||||
source: author.avatarMediaId ? ("image://mxc/" + author.avatarMediaId) : ""
|
||||
@@ -38,18 +39,10 @@ RowLayout {
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: author.displayName
|
||||
color: Kirigami.Theme.disabledTextColor
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: display
|
||||
color: Kirigami.Theme.disabledTextColor
|
||||
font.weight: Font.Medium
|
||||
|
||||
wrapMode: Label.Wrap
|
||||
wrapMode: Text.WordWrap
|
||||
textFormat: Text.RichText
|
||||
text: "<a href=\"https://matrix.to/#/" + author.id + "\" style='color: " + author.color + "'>" + author.displayName + "</a> " + display
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,18 +329,12 @@ Kirigami.ScrollablePage {
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "state"
|
||||
delegate: TimelineContainer {
|
||||
id: container
|
||||
width: messageListView.width - Kirigami.Units.largeSpacing
|
||||
isLoaded: timelineDelegateChooser.delegateLoaded
|
||||
cardBackground: false
|
||||
|
||||
hoverComponent: hoverActions
|
||||
|
||||
innerObject: StateDelegate {
|
||||
Layout.maximumWidth: container.width
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
}
|
||||
delegate: QQC2.Control {
|
||||
leftPadding: Kirigami.Units.gridUnit * 1.5 + Kirigami.Units.smallSpacing
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
contentItem: StateDelegate { }
|
||||
implicitWidth: messageListView.width - Kirigami.Units.largeSpacing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user