diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-09-17 23:11:24 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-09-17 23:11:24 +0200 |
commit | 43c8e64ed35419e0a257b7b194aa5a9fa6b3c527 (patch) | |
tree | 7df323303ca364c4b9894303cc26eed43da9eca5 /resources | |
parent | Fix power level indicator size (diff) | |
download | nheko-43c8e64ed35419e0a257b7b194aa5a9fa6b3c527.tar.xz |
Fix alignment of file messages and redactions
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageView.qml | 5 | ||||
-rw-r--r-- | resources/qml/TimelineEvent.qml | 5 | ||||
-rw-r--r-- | resources/qml/delegates/ImageMessage.qml | 9 |
3 files changed, 12 insertions, 7 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index eccd0496..1add0ce7 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -216,6 +216,11 @@ Item { ] } + Item { + // spacer to fill width if needed + Layout.fillWidth: true + } + RowLayout { id: metadata diff --git a/resources/qml/TimelineEvent.qml b/resources/qml/TimelineEvent.qml index 3e98a2cf..f1b6bd2a 100644 --- a/resources/qml/TimelineEvent.qml +++ b/resources/qml/TimelineEvent.qml @@ -141,8 +141,8 @@ EventDelegateChooser { required property string userName Layout.fillWidth: true - Layout.maximumWidth: tempWidth - Layout.maximumHeight: timelineView.height / 8 + //Layout.maximumWidth: tempWidth + //Layout.maximumHeight: timelineView.height / 8 containerHeight: timelineView.height } } @@ -181,7 +181,6 @@ EventDelegateChooser { EncryptionEnabled { required property string userId - required property string userName Layout.fillWidth: true } diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml index 504aba0d..466041bd 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml @@ -11,6 +11,7 @@ import im.nheko AbstractButton { required property int type required property int originalWidth + required property int originalHeight required property double proportionalHeight required property string url required property string blurhash @@ -21,10 +22,10 @@ AbstractButton { required property int containerHeight property double divisor: isReply ? 5 : 3 - property int tempWidth: originalWidth < 1? 400: originalWidth - - Layout.preferredWidth: Math.round(tempWidth*Math.min((containerHeight/divisor)/(tempWidth*proportionalHeight), 1)) - Layout.preferredHeight: width*proportionalHeight + //Layout.maximumWidth: originalWidth + Layout.maximumHeight: Math.min(originalHeight, containerHeight / divisor) + implicitWidth: height/proportionalHeight + implicitHeight: Math.min(Layout.maximumHeight, width*proportionalHeight) hoverEnabled: true state: (img.status != Image.Ready || timeline.privacyScreen.active) ? "BlurhashVisible" : "ImageVisible" |