fixed most of the binding loops

This commit is contained in:
Malte E 2022-02-09 21:36:04 +01:00
parent 5db7ec7f03
commit 0e548b7d39
7 changed files with 25 additions and 6 deletions

View file

@ -17,13 +17,16 @@ Item {
required property string filename
required property bool isReply
required property string eventId
property double tempWidth: Math.min(parent.width, originalWidth < 1 ? 200 : originalWidth)
property int maxWidth
property double tempWidth: Math.min(maxWidth, originalWidth < 1 ? 200 : originalWidth)
property double tempHeight: tempWidth * proportionalHeight
property double divisor: isReply ? 5 : 3
property bool tooHigh: tempHeight > timelineView.height / divisor
height: Math.round(tooHigh ? timelineView.height / divisor : tempHeight)
width: Math.round(tooHigh ? (timelineView.height / divisor) / proportionalHeight : tempWidth)
implicitHeight: height
implicitWidth: width
Image {
id: blurhash_