Fix EventFile sizing/elliding
This commit is contained in:
parent
4b76725006
commit
deedc8c7aa
|
@ -164,32 +164,6 @@ HRowLayout {
|
||||||
|
|
||||||
Layout.preferredWidth: item ? item.width : -1
|
Layout.preferredWidth: item ? item.width : -1
|
||||||
Layout.preferredHeight: item ? item.height : -1
|
Layout.preferredHeight: item ? item.height : -1
|
||||||
|
|
||||||
// Layout.minimumWidth:
|
|
||||||
// type === EventDelegate.Media.Image ?
|
|
||||||
// (singleMediaInfo.media_width ||
|
|
||||||
// (item ? item.loadingLabel.implicitWidth : -1)) : -1
|
|
||||||
|
|
||||||
// Layout.minimumHeight:
|
|
||||||
// type === EventDelegate.Media.Image ?
|
|
||||||
// (singleMediaInfo.media_height ||
|
|
||||||
// (item ? item.loadingLabel.implicitHeight : -1)) : -1
|
|
||||||
|
|
||||||
// Layout.minimumWidth:
|
|
||||||
// type === EventDelegate.Media.File ?
|
|
||||||
// theme.chat.message.fileMinWidth : -1
|
|
||||||
|
|
||||||
// Layout.preferredWidth:
|
|
||||||
// type === EventDelegate.Media.Video ?
|
|
||||||
// theme.chat.message.videoWidth :
|
|
||||||
|
|
||||||
// type === EventDelegate.Media.Audio ?
|
|
||||||
// theme.chat.message.audioWidth :
|
|
||||||
|
|
||||||
// -1
|
|
||||||
|
|
||||||
// Layout.maximumWidth: messageBodyWidth
|
|
||||||
// Layout.maximumHeight: eventList.height / 2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,12 @@ import QtQuick.Layouts 1.12
|
||||||
import "../../Base"
|
import "../../Base"
|
||||||
|
|
||||||
HTile {
|
HTile {
|
||||||
|
width: Math.max(
|
||||||
|
Math.min(eventContent.messageBodyWidth,
|
||||||
|
theme.chat.message.fileMinWidth),
|
||||||
|
Math.min(eventContent.messageBodyWidth, implicitWidth),
|
||||||
|
)
|
||||||
|
|
||||||
onLeftClicked: Qt.openUrlExternally(loader.mediaUrl)
|
onLeftClicked: Qt.openUrlExternally(loader.mediaUrl)
|
||||||
onRightClicked: eventDelegate.openContextMenu()
|
onRightClicked: eventDelegate.openContextMenu()
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ HMxcImage {
|
||||||
id: image
|
id: image
|
||||||
width: fitSize.width
|
width: fitSize.width
|
||||||
height: fitSize.height
|
height: fitSize.height
|
||||||
|
|
||||||
horizontalAlignment: Image.AlignLeft
|
horizontalAlignment: Image.AlignLeft
|
||||||
animated: loader.singleMediaInfo.media_mime === "image/gif" ||
|
animated: loader.singleMediaInfo.media_mime === "image/gif" ||
|
||||||
Utils.urlExtension(loader.mediaUrl) === "gif"
|
Utils.urlExtension(loader.mediaUrl) === "gif"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user