summary refs log tree commit diff
path: root/resources/qml/delegates/ImageMessage.qml
diff options
context:
space:
mode:
authorMalte E <malte.e@mailbox.org>2022-02-14 21:07:03 +0100
committerMalte E <malte.e@mailbox.org>2022-02-14 21:07:03 +0100
commit6f3ed5b2823b7d8f5c522448300ba09db56c1512 (patch)
tree249aec0e4462aa3be15be08cc7b7f158bbb1689c /resources/qml/delegates/ImageMessage.qml
parentFix second codeblock not wrapping (diff)
downloadnheko-6f3ed5b2823b7d8f5c522448300ba09db56c1512.tar.xz
space-saving metadata placement
Diffstat (limited to 'resources/qml/delegates/ImageMessage.qml')
-rw-r--r--resources/qml/delegates/ImageMessage.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index a13bb4f6..fea3eaef 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -20,9 +20,12 @@ Item {
     property double divisor: isReply ? 5 : 3
 
     implicitWidth: Math.round(originalWidth*Math.min((timelineView.height/divisor)/(originalWidth*proportionalHeight), 1))
-    width: parent.width
+    width: Math.min(parent.width,implicitWidth)
     height: width*proportionalHeight
 
+    property int metadataWidth
+    property bool fitsMetadata: (parent.width - width) > metadataWidth+4
+
     Image {
         id: blurhash_