mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix alignment of file messages and redactions
This commit is contained in:
parent
e96b552959
commit
43c8e64ed3
3 changed files with 12 additions and 7 deletions
|
@ -216,6 +216,11 @@ Item {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
// spacer to fill width if needed
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: metadata
|
id: metadata
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,8 @@ EventDelegateChooser {
|
||||||
required property string userName
|
required property string userName
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.maximumWidth: tempWidth
|
//Layout.maximumWidth: tempWidth
|
||||||
Layout.maximumHeight: timelineView.height / 8
|
//Layout.maximumHeight: timelineView.height / 8
|
||||||
containerHeight: timelineView.height
|
containerHeight: timelineView.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,6 @@ EventDelegateChooser {
|
||||||
|
|
||||||
EncryptionEnabled {
|
EncryptionEnabled {
|
||||||
required property string userId
|
required property string userId
|
||||||
required property string userName
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import im.nheko
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
required property int type
|
required property int type
|
||||||
required property int originalWidth
|
required property int originalWidth
|
||||||
|
required property int originalHeight
|
||||||
required property double proportionalHeight
|
required property double proportionalHeight
|
||||||
required property string url
|
required property string url
|
||||||
required property string blurhash
|
required property string blurhash
|
||||||
|
@ -21,10 +22,10 @@ AbstractButton {
|
||||||
required property int containerHeight
|
required property int containerHeight
|
||||||
property double divisor: isReply ? 5 : 3
|
property double divisor: isReply ? 5 : 3
|
||||||
|
|
||||||
property int tempWidth: originalWidth < 1? 400: originalWidth
|
//Layout.maximumWidth: originalWidth
|
||||||
|
Layout.maximumHeight: Math.min(originalHeight, containerHeight / divisor)
|
||||||
Layout.preferredWidth: Math.round(tempWidth*Math.min((containerHeight/divisor)/(tempWidth*proportionalHeight), 1))
|
implicitWidth: height/proportionalHeight
|
||||||
Layout.preferredHeight: width*proportionalHeight
|
implicitHeight: Math.min(Layout.maximumHeight, width*proportionalHeight)
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
state: (img.status != Image.Ready || timeline.privacyScreen.active) ? "BlurhashVisible" : "ImageVisible"
|
state: (img.status != Image.Ready || timeline.privacyScreen.active) ? "BlurhashVisible" : "ImageVisible"
|
||||||
|
|
Loading…
Reference in a new issue