Skip to content
Snippets Groups Projects
Verified Commit b0df4049 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Shrink replies

parent a86e364d
No related branches found
No related tags found
No related merge requests found
Pipeline #5126 failed
...@@ -229,7 +229,7 @@ TimelineEvent { ...@@ -229,7 +229,7 @@ TimelineEvent {
Rectangle { Rectangle {
id: replyLine id: replyLine
height: Math.min( wrapper.reply?.height, timelineView.height / 5) + Nheko.paddingSmall + replyUserButton.height height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
color: replyRow.userColor color: replyRow.userColor
width: 4 width: 4
} }
......
...@@ -217,7 +217,7 @@ TimelineEvent { ...@@ -217,7 +217,7 @@ TimelineEvent {
Rectangle { Rectangle {
id: replyLine id: replyLine
height: Math.min( wrapper.reply?.height, timelineView.height / 5) + Nheko.paddingSmall + replyUserButton.height height: Math.min( wrapper.reply?.height, timelineView.height / 10) + Nheko.paddingSmall + replyUserButton.height
color: replyRow.userColor color: replyRow.userColor
width: 4 width: 4
} }
......
...@@ -18,7 +18,7 @@ AbstractButton { ...@@ -18,7 +18,7 @@ AbstractButton {
required property string filename required property string filename
required property string eventId required property string eventId
required property int containerHeight required property int containerHeight
property double divisor: EventDelegateChooser.isReply ? 5 : 3 property double divisor: EventDelegateChooser.isReply ? 10 : 4
EventDelegateChooser.keepAspectRatio: true EventDelegateChooser.keepAspectRatio: true
EventDelegateChooser.maxWidth: originalWidth EventDelegateChooser.maxWidth: originalWidth
......
...@@ -22,7 +22,7 @@ Item { ...@@ -22,7 +22,7 @@ Item {
required property string url required property string url
required property string body required property string body
required property string filesize required property string filesize
property double divisor: EventDelegateChooser.isReply ? 5 : 3 property double divisor: EventDelegateChooser.isReply ? 10 : 4
property int tempWidth: originalWidth < 1? 400: originalWidth property int tempWidth: originalWidth < 1? 400: originalWidth
implicitWidth: type == MtxEvent.VideoMessage ? Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1)) : 500 implicitWidth: type == MtxEvent.VideoMessage ? Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1)) : 500
width: Math.min(parent?.width ?? implicitWidth, implicitWidth) width: Math.min(parent?.width ?? implicitWidth, implicitWidth)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment