6 files changed, 38 insertions, 5 deletions
diff --git a/resources/qml/delegates/FileMessage.qml b/resources/qml/delegates/FileMessage.qml
index c6f213ee..ffd1e82b 100644
--- a/resources/qml/delegates/FileMessage.qml
+++ b/resources/qml/delegates/FileMessage.qml
@@ -65,7 +65,7 @@ Item {
}
Rectangle {
- color: colors.dark
+ color: colors.alternateBase
z: -1
radius: 10
height: row.height + 24
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index e2c78fbe..5c3dac95 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -31,11 +31,44 @@ Item {
fillMode: Image.PreserveAspectFit
MouseArea {
+ id: mouseArea
+
enabled: model.data.type == MtxEvent.ImageMessage && img.status == Image.Ready
+ hoverEnabled: true
anchors.fill: parent
onClicked: TimelineManager.openImageOverlay(model.data.url, model.data.id)
}
+ Item {
+ id: overlay
+
+ anchors.fill: parent
+ visible: mouseArea.containsMouse
+
+ Rectangle {
+ id: container
+
+ width: parent.width
+ implicitHeight: imgcaption.implicitHeight
+ anchors.bottom: overlay.bottom
+ color: colors.window
+ opacity: 0.75
+ }
+
+ Text {
+ id: imgcaption
+
+ anchors.fill: container
+ elide: Text.ElideMiddle
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ // See this MSC: https://github.com/matrix-org/matrix-doc/pull/2530
+ text: model.data.filename ? model.data.filename : model.data.body
+ color: colors.text
+ }
+
+ }
+
}
}
diff --git a/resources/qml/delegates/NoticeMessage.qml b/resources/qml/delegates/NoticeMessage.qml
index d9a7a3e7..67a69055 100644
--- a/resources/qml/delegates/NoticeMessage.qml
+++ b/resources/qml/delegates/NoticeMessage.qml
@@ -2,5 +2,5 @@ TextMessage {
font.italic: true
color: colors.buttonText
height: isReply ? Math.min(chat.height / 8, implicitHeight) : undefined
- clip: true
+ clip: isReply
}
diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml
index 4acf2bef..88f6c7fd 100644
--- a/resources/qml/delegates/Pill.qml
+++ b/resources/qml/delegates/Pill.qml
@@ -9,7 +9,7 @@ Label {
background: Rectangle {
radius: parent.height / 2
- color: colors.dark
+ color: colors.alternateBase
}
}
diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 9ad115c7..be22687f 100644
--- a/resources/qml/delegates/PlayableMediaMessage.qml
+++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -8,7 +8,7 @@ Rectangle {
id: bg
radius: 10
- color: colors.dark
+ color: colors.alternateBase
height: Math.round(content.height + 24)
width: parent ? parent.width : undefined
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index 69f2f0e3..8a1c116e 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -7,6 +7,6 @@ MatrixText {
text: "<style type=\"text/css\">a { color:" + colors.link + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap'>")
width: parent ? parent.width : undefined
height: isReply ? Math.round(Math.min(timelineRoot.height / 8, implicitHeight)) : undefined
- clip: true
+ clip: isReply
font.pointSize: (Settings.enlargeEmojiOnlyMessages && model.data.isOnlyEmoji > 0 && model.data.isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
}
|