diff options
author | Malte E <malte.e@mailbox.org> | 2022-02-14 14:03:17 +0100 |
---|---|---|
committer | Malte E <malte.e@mailbox.org> | 2022-02-14 14:03:17 +0100 |
commit | 414257bf0eba7f8415644509ae617883ac266e40 (patch) | |
tree | 3d45044617c4226bca24dec3f6c0f735d00a54d0 /resources/qml/delegates | |
parent | fix vertical space for some state events (diff) | |
download | nheko-414257bf0eba7f8415644509ae617883ac266e40.tar.xz |
fix bugs found by Nico
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r-- | resources/qml/delegates/FileMessage.qml | 3 | ||||
-rw-r--r-- | resources/qml/delegates/PlayableMediaMessage.qml | 3 | ||||
-rw-r--r-- | resources/qml/delegates/Redacted.qml | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/resources/qml/delegates/FileMessage.qml b/resources/qml/delegates/FileMessage.qml index 1e50fe3a..fd81b176 100644 --- a/resources/qml/delegates/FileMessage.qml +++ b/resources/qml/delegates/FileMessage.qml @@ -87,8 +87,7 @@ Item { color: Nheko.colors.alternateBase z: -1 radius: 10 - height: row.height + 24 - width: 44 + 24 + 24 + Math.max(Math.min(filesize_.width, filesize_.implicitWidth), Math.min(filename_.width, filename_.implicitWidth)) + anchors.fill: parent } } diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml index 9324cdaf..54813d23 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml @@ -23,7 +23,8 @@ Item { required property string body required property string filesize property double divisor: isReply ? 4 : 2 - implicitWidth: type == MtxEvent.VideoMessage ? Math.round(originalWidth*Math.min((timelineView.height/divisor)/(originalWidth*proportionalHeight), 1)) : 500 + property int tempWidth: originalWidth < 1? 400: originalWidth + implicitWidth: type == MtxEvent.VideoMessage ? Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1)) : 500 width: parent.width height: (type == MtxEvent.VideoMessage ? width*proportionalHeight : 80) + fileInfoLabel.height implicitHeight: height diff --git a/resources/qml/delegates/Redacted.qml b/resources/qml/delegates/Redacted.qml index cf723988..7e5a10f9 100644 --- a/resources/qml/delegates/Redacted.qml +++ b/resources/qml/delegates/Redacted.qml @@ -10,10 +10,9 @@ import im.nheko 1.0 Rectangle{ - //required property real delegateWidth height: redactedLayout.implicitHeight + Nheko.paddingSmall implicitWidth: redactedLayout.implicitWidth + 2 * Nheko.paddingMedium - //implicitWidth: width + width: parent.width radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall color: Nheko.colors.alternateBase |