Clip replies by default
In the future we should probably add a gradient when clipped...
This commit is contained in:
parent
000ab4853a
commit
004d10bfee
6 changed files with 19 additions and 5 deletions
|
|
@ -20,8 +20,14 @@ Rectangle {
|
|||
Rectangle {
|
||||
id: videoContainer
|
||||
visible: model.data.type == MtxEvent.VideoMessage
|
||||
width: Math.min(parent.width, model.data.width ? model.data.width : 400) // some media has 0 as size...
|
||||
height: width*model.data.proportionalHeight
|
||||
property double tempWidth: Math.min(parent ? parent.width : undefined, model.data.width < 1 ? 400 : model.data.width)
|
||||
property double tempHeight: tempWidth * model.data.proportionalHeight
|
||||
|
||||
property double divisor: model.isReply ? 4 : 2
|
||||
property bool tooHigh: tempHeight > timelineRoot.height / divisor
|
||||
|
||||
height: tooHigh ? timelineRoot.height / divisor : tempHeight
|
||||
width: tooHigh ? (timelineRoot.height / divisor) / model.data.proportionalHeight : tempWidth
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: model.data.thumbnailUrl.replace("mxc://", "image://MxcImage/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue