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