mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Background color for code and don't collapse space in timeline
This commit is contained in:
parent
7abeb1f1a4
commit
97688763f6
2 changed files with 8 additions and 7 deletions
|
@ -38,6 +38,13 @@ Rectangle {
|
|||
sourceSize.height: avatar.height
|
||||
layer.enabled: true
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
onClicked: TimelineManager.openImageOverlay(TimelineManager.timeline.avatarUrl(userid), TimelineManager.timeline.data.id)
|
||||
}
|
||||
|
||||
layer.effect: OpacityMask {
|
||||
|
||||
maskSource: Rectangle {
|
||||
|
@ -49,12 +56,6 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
onClicked: TimelineManager.openImageOverlay(TimelineManager.timeline.avatarUrl(userid), TimelineManager.timeline.data.id)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -4,7 +4,7 @@ import im.nheko 1.0
|
|||
MatrixText {
|
||||
property string formatted: model.data.formattedBody
|
||||
|
||||
text: "<style type=\"text/css\">a { color:" + colors.link + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap'>")
|
||||
text: "<span style='white-space: pre-wrap'><style type=\"text/css\">a { color:" + colors.link + ";}\ncode { background-color: " + colors.alternateBase + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + colors.alternateBase + "'>") + "</span>"
|
||||
width: parent ? parent.width : undefined
|
||||
height: isReply ? Math.round(Math.min(timelineRoot.height / 8, implicitHeight)) : undefined
|
||||
clip: isReply
|
||||
|
|
Loading…
Reference in a new issue