Fix some reply layouting loops

This commit is contained in:
Nicolas Werner 2023-08-25 21:03:05 +02:00
parent b187440e68
commit 55107ed0ce
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
4 changed files with 5 additions and 7 deletions

View file

@ -56,7 +56,7 @@ Popup {
eventId: mid
userColor: TimelineManager.userColor(modelData.userId, palette.window)
width: parent.width
maxWidth: parent.width
}
MatrixTextField {
id: roomTextInput

View file

@ -32,7 +32,7 @@ Rectangle {
eventId: room.reply ?? ""
userColor: TimelineManager.userColor(modelData.userId, palette.window)
visible: room && room.reply
width: parent.width
maxWidth: parent.width - anchors.leftMargin - anchors.rightMargin
}
ImageButton {
id: closeReplyButton

View file

@ -285,7 +285,7 @@ Pane {
property var e: room ? room.getDump(modelData, "pins") : {}
Layout.fillWidth: true
maxWidth: pinnedMessages.width
//Layout.preferredHeight: height
eventId: e.eventId ?? ""
userColor: TimelineManager.userColor(e.userId, palette.window)

View file

@ -24,6 +24,7 @@ AbstractButton {
property string userName: eventId ? room.dataById(eventId, Room.UserName, "") : ""
implicitHeight: replyContainer.implicitHeight
implicitWidth: replyContainer.implicitWidth
property int maxWidth
NhekoCursorShape {
anchors.fill: parent
@ -48,14 +49,11 @@ AbstractButton {
eventId: r.eventId
replyTo: ""
width: parent.width
height: replyContainer.implicitHeight
//height: replyContainer.implicitHeight
data: GridLayout {
id: replyContainer
width: parent.width
width: r.maxWidth
columns: 2
rows: 2
columnSpacing: Nheko.paddingMedium